Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: string indices must be integers #17

Open
tokejepsen opened this issue Sep 7, 2016 · 0 comments
Open

TypeError: string indices must be integers #17

tokejepsen opened this issue Sep 7, 2016 · 0 comments

Comments

@tokejepsen
Copy link

Getting this error, when querying a layout;

    api.get_shot_data(project_code, production_shot_ref)
  File "/Volumes/warpfs1/Environment/Users/tokejepsen/production/senate-database/senate_database/database.py", line 37, in get_shot_data
    Production_Shot_Ref=production_shot_ref)
  File "/Volumes/warpfs1/Environment/Users/tokejepsen/production/senate-database/senate_database/database.py", line 58, in get_data
    return fm.toJSON(fm.doFind(**kwargs))
  File "/Volumes/warpfs1/Environment/Users/tokejepsen/production/senate-database/PyFileMaker/PyFileMaker/FMServer.py", line 425, in doFind
    return self._doAction('-find')
  File "/Volumes/warpfs1/Environment/Users/tokejepsen/production/senate-database/PyFileMaker/PyFileMaker/FMServer.py", line 620, in _doAction
    result = FMResultset.FMResultset(result)
  File "/Volumes/warpfs1/Environment/Users/tokejepsen/production/senate-database/PyFileMaker/PyFileMaker/FMResultset.py", line 34, in __init__
    self.doParseResultset()
  File "/Volumes/warpfs1/Environment/Users/tokejepsen/production/senate-database/PyFileMaker/PyFileMaker/FMResultset.py", line 112, in doParseResultset
    if rec['RECORDID'] == subrecordDict['RECORDID']:
TypeError: string indices must be integers

It seems to be related to a issue reported here; gozoinks/pyfilemaker#3

I seem to be able to fix it by having a fail safe for unicode;

https://gist.github.com/tokejepsen/1eb8cac0b2ed513ba7b31315ab512419#file-pf-py-L112

Don't know what that might entail for the rest of the code, but I can do a PR.

tokejepsen added a commit to tokejepsen/PyFileMaker that referenced this issue Sep 13, 2016
fix for aeguana#17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant