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

Bug: AttributeError: 'ReadTimeout' object has no attribute 'message' #235

Open
patrikgrenfeldt opened this issue Nov 24, 2021 · 1 comment

Comments

@patrikgrenfeldt
Copy link

patrikgrenfeldt commented Nov 24, 2021

I think I found something to fix that would make your great library even better :)

Last part of my stacktrace:

File "/Users/patrik.grenfeldt/Documents/GitHub/cg/cg/apps/lims/order.py", line 32, in save_containers
    container_map[lims_container.name] = lims_container
  File "/Users/patrik.grenfeldt/opt/anaconda3/envs/dev38/lib/python3.8/site-packages/genologics/descriptors.py", line 54, in __get__
    instance.get()
  File "/Users/patrik.grenfeldt/opt/anaconda3/envs/dev38/lib/python3.8/site-packages/genologics/entities.py", line 289, in get
    self.root = self.lims.get(self.uri)
  File "/Users/patrik.grenfeldt/opt/anaconda3/envs/dev38/lib/python3.8/site-packages/genologics/lims.py", line 87, in get
    raise type(e)("{0}, Error trying to reach {1}".format(e.message, uri))
AttributeError: 'ReadTimeout' object has no attribute 'message'

Best wishes
Patrik

@patrikgrenfeldt
Copy link
Author

We are using a construct like this in some cases:
error_message = error.message if hasattr(error, "message") else str(error)

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