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
rdflib/plugins/shared/jsonld/context.py UnboundLocalError: local variable 'new_base' referenced before assignment #2303
Comments
Thanks for the report @crisely09 - I will try have it fixed in 6.3.2. |
@crisely09 could you share some more details of the code that triggered this? |
A variable was only being initialized for string-valued inputs, but if a `dict` input was passed the variable would still be accessed, resulting in a `UnboundLocalError`. This change initializes the variable always, instead of only when string-valued input is used to construct a JSON-LD context. - Closes <RDFLib#2303>.
A variable was only being initialized for string-valued inputs, but if a `dict` input was passed the variable would still be accessed, resulting in a `UnboundLocalError`. This change initializes the variable always, instead of only when string-valued input is used to construct a JSON-LD context. - Closes <RDFLib#2303>.
We inherit the class, we use it mainly to resolve documents. See https://github.com/BlueBrain/nexus-forge/blob/master/kgforge/core/commons/context.py |
@crisely09 Okay, I think I managed to fix it in #2306, maybe try running with that branch, but otherwise it will be releases in 6.3.2 before Monday. |
A variable was only being initialized for string-valued inputs, but if a `dict` input was passed the variable would still be accessed, resulting in a `UnboundLocalError`. This change initializes the variable always, instead of only when string-valued input is used to construct a JSON-LD context. - Closes <RDFLib#2303>.
Great, I will try again on Monday after the release. |
A variable was only being initialized for string-valued inputs, but if a `dict` input was passed the variable would still be accessed, resulting in a `UnboundLocalError`. This change initializes the variable always, instead of only when string-valued input is used to construct a JSON-LD context. - Closes <#2303>.
We migrated from rdflib 6.2.0 to 6.3.1 and now we are getting a completely new error initializing a
Context
instance.See error below:
I believe the variable
new_base
was named justbase
in the previous version.The text was updated successfully, but these errors were encountered: