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 issue with optional dependencies in S3/DX codepath #137

Open
kyleabeauchamp opened this issue May 14, 2020 · 0 comments
Open

Import issue with optional dependencies in S3/DX codepath #137

kyleabeauchamp opened this issue May 14, 2020 · 0 comments

Comments

@kyleabeauchamp
Copy link
Contributor

I've noticed that if you do a simple pip install stor (version 3.1.0), there are some S3 code paths that raise exceptions due to not-imported optional DX components.

The following is a MWE:

import stor.s3

s3_path = "s3://path_to_thing"

fh = stor.s3.S3Path(s3_path)

fh.open()

When executing this script, the following exception occurs during object destruction:

Exception ignored in: <function OBSFile.__del__ at 0x1069f>
Traceback (most recent call last):
  File "[...]lib/python3.7/site-packages/stor/obs.py", line 401, in __del__
    self.close()
  File "[...]lib/python3.7/site-packages/stor/obs.py", line 457, in close
    self._wait_on_close()
  File "[...]lib/python3.7/site-packages/stor/obs.py", line 460, in _wait_on_close
    if isinstance(self._path, stor.dx.DXPath):
AttributeError: module 'stor' has no attribute 'dx'
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