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

Depositor missing 'timeout' attribute used with self.do_http_request #64

Open
nausicaa-rose opened this issue May 23, 2024 · 1 comment · May be fixed by #65
Open

Depositor missing 'timeout' attribute used with self.do_http_request #64

nausicaa-rose opened this issue May 23, 2024 · 1 comment · May be fixed by #65

Comments

@nausicaa-rose
Copy link

Hello,
I've found your library useful, but encountered a bug recently. crossref.restful.Depositor has several methods that expect to pass the the attribute self.timeout as a parameter to self.do_http_request, which throws this error: "AttributeError: 'Depositor' object has no attribute 'timeout'" because self.timeout is never initialized.

I did a quick patch by adding timeout=100 to Depositor.__init__()'s parameter list and adding self.timeout = timeout in the body of the init, which fixed the issue, at least in my very cursory testing.

If the above is an acceptable solution, I'm happy to test it out more thoroughly and submit a pull request. If you'd prefer another approach, I'd be happy to help with that as well.

Thanks for creating and maintaining this library!

@fabiobatalha
Copy link
Owner

hello @nausicaa-rose sorry for the delay in answer you. Yes, you can submit a MR.

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

Successfully merging a pull request may close this issue.

2 participants