You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to run Python code that uses the Python Package "config", a namespace error occurs. Python will import the config module that belongs to reticulate itself, rather than the top level package "config".
Here's a minimal example. The example assumes that you have a Python virtual environment set up called 'venv'. The example will attempt to install the config package as well.
This example assumes a minimal 'config.cfg' such as this:
test: 'test'
The above code produces the following error: Traceback (most recent call last): File "<string>", line 1, in <module> AttributeError: module 'config' has no attribute 'Config'
When other packages are imported, they are correctly loaded from the virtual environment. Is there a solution to avoid this namespace conflict?
Code very similar to this has been used as part of a project in the past and has successfully avoided the issue, but the exact solution is not known.
If I import the module in R using reticulate::import('config') the package is found correctly
The text was updated successfully, but these errors were encountered:
Greetings,
When trying to run Python code that uses the Python Package "config", a namespace error occurs. Python will import the config module that belongs to reticulate itself, rather than the top level package "config".
Here's a minimal example. The example assumes that you have a Python virtual environment set up called 'venv'. The example will attempt to install the config package as well.
`
This example assumes a minimal 'config.cfg' such as this:
The above code produces the following error:
Traceback (most recent call last): File "<string>", line 1, in <module> AttributeError: module 'config' has no attribute 'Config'
When other packages are imported, they are correctly loaded from the virtual environment. Is there a solution to avoid this namespace conflict?
Code very similar to this has been used as part of a project in the past and has successfully avoided the issue, but the exact solution is not known.
If I import the module in R using
reticulate::import('config')
the package is found correctlyThe text was updated successfully, but these errors were encountered: