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

import slycat.darray broken #516

Closed
alexsielicki opened this issue Oct 21, 2015 · 1 comment
Closed

import slycat.darray broken #516

alexsielicki opened this issue Oct 21, 2015 · 1 comment
Assignees

Comments

@alexsielicki
Copy link
Collaborator

import slycat.darray

results in an error:

>>> import slycat.darray
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/slycat/src/slycat/packages/slycat/darray.py", line 31, in <module>
    import slycat.email
  File "/home/slycat/src/slycat/packages/slycat/email.py", line 2, in <module>
    import slycat.web.server
  File "/home/slycat/src/slycat/packages/slycat/web/server/__init__.py", line 11, in <module>
    import slycat.hdf5
  File "/home/slycat/src/slycat/packages/slycat/hdf5.py", line 8, in <module>
    class DArray(slycat.darray.Prototype):
AttributeError: 'module' object has no attribute 'darray'

The problem might be with the fact that slycat.darray imports slycat.email, which imports slycat.web.server, which imports slycat.hdf5, which tries to import slycat.darray, which is in the process of being imported?

@srbdev
Copy link
Contributor

srbdev commented Oct 21, 2015

Modifying the scope of the import works because the function send_error is parsed but not executed. When it is finally called, all modules have been imported so Python can resolve the import statement inside the function.

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

2 participants