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

UnboundLocalError: local variable 'req_content' referenced before assignment #8

Open
astrojuanlu opened this issue Mar 31, 2023 · 1 comment

Comments

@astrojuanlu
Copy link

After fixing gh-7 locally, I encountered another error:

Traceback (most recent call last):
  File "/home/juanlu/Projects/Other/SnifferDog/lib_ver_producer.py", line 210, in <module>
    main()
  File "/home/juanlu/Projects/Other/SnifferDog/lib_ver_producer.py", line 206, in main
    print(req_content)
UnboundLocalError: local variable 'req_content' referenced before assignment
@astrojuanlu
Copy link
Author

astrojuanlu commented Mar 31, 2023

Can happen if the all() condition at the beginning is not met:

req_content = "\n".join(req_entries)
else:
print("Might contain some packages that are not included in our API Bank database! It would be great if you can report this to us!")
print(req_content)

(see also gh-9)

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