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

catalog/onix/onix.py attempts to use a global variable in init(), but doesn't declare it global #2

Closed
bowlofeggs opened this issue Aug 4, 2010 · 3 comments

Comments

@bowlofeggs
Copy link

onix_codelists and onix_shortnames are both initialized to None. Later in the module loading, init() gets called, which attempts to set them to useful dictionaries. Because they aren't declared global in init(), new variables are created within init() that exist only within the scope of that method. The fix is to add these lines to the top of init():

global onix_codelists
global onix_shortnames

I've forked the project and intend to make a push that will fix this issue soon. I'll post back here with the revision that you can pull to get the fix. Thanks!

@bowlofeggs
Copy link
Author

@ghost ghost assigned EdwardBetts Jul 13, 2011
@bencomp
Copy link
Contributor

bencomp commented Feb 2, 2013

Perhaps should do a pull request? :)

@sbshah97
Copy link
Contributor

@mekarpeles I think we should close this!

cdrini added a commit that referenced this issue Aug 12, 2020
roshanr11 added a commit to joycewu37/openlibrary that referenced this issue Dec 6, 2021
yoonmgyg pushed a commit to yoonmgyg/openlibrary that referenced this issue Nov 30, 2022
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

5 participants