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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mergeindex list issue #210

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fcole90
Copy link

@fcole90 fcole90 commented Jul 10, 2022

Hi and thanks for this awesome library.

While running it, I encountered the following error:

$ ./tools/build.sh Gtk-3.0
All done
Traceback (most recent call last):
  File "/home/fabio/Projects/scratches/pgi-docgen/./pgi-docgen", line 14, in <module>
    sys.exit(main(sys.argv))
  File "/home/fabio/Projects/scratches/pgi-docgen/pgidocgen/main.py", line 29, in main
    return args.func(args)
  File "/home/fabio/Projects/scratches/pgi-docgen/pgidocgen/build.py", line 260, in main
    mergeindex(target_path)
  File "/home/fabio/Projects/scratches/pgi-docgen/pgidocgen/mergeindex.py", line 170, in mergeindex
    output = merger.merge()
  File "/home/fabio/Projects/scratches/pgi-docgen/pgidocgen/mergeindex.py", line 123, in merge
    for attr, v in attributes.items():
AttributeError: 'list' object has no attribute 'items'

It seems the mergeindex file was mistaking a list for a dictionary. I added some typing to aid me with fixing the issue. I think this mostly makes sense (and the error is no longer there) but I'm not 100% sure about the output type. I can say that it's now coherent with the input and at least produces a final merged index 馃槉

new_attributes = new_objects[k]

for attr, v in attributes.items():
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the point where it was failing

@fcole90 fcole90 force-pushed the fco/fix-mergeindex-list-issue branch 4 times, most recently from 81cdff2 to 7ef4e00 Compare July 10, 2022 17:09
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

Successfully merging this pull request may close these issues.

None yet

1 participant