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

simple net usage has unexpected results #2

Closed
t4k opened this issue Jan 28, 2021 · 3 comments
Closed

simple net usage has unexpected results #2

t4k opened this issue Jan 28, 2021 · 3 comments
Labels
Coding: bug 🐛 Something isn't working

Comments

@t4k
Copy link
Member

t4k commented Jan 28, 2021

Describe the bug

With just a method and a url for net(), there is no result and a ValueError. I am able to get a result with cURL.

To Reproduce

from commonpy.network_utils import net
print(net('get', 'https://caltech.tind.io/search?ln=en&p=barcode%3A+35047019492099&of=xm'))

result:
(None, ValueError('httpx.Timeout must either include a default, or set all four parameters explicitly.'))

Environment (please complete the following information)

  • Operating system: macOS 10.15.7
  • Version of Python: 3.9.1

Additional context

cURL can return the expected XML:
curl -H "Accept: application/xml" -H "Content-Type: application/xml" -X GET "https://caltech.tind.io/search?ln=en&p=barcode%3A+35047019492099&of=xm"

@mhucka mhucka added the Coding: bug 🐛 Something isn't working label Jan 28, 2021
@mhucka
Copy link
Collaborator

mhucka commented Jan 28, 2021

I can reproduce this. Looks like a bug. Will investigate.

@mhucka
Copy link
Collaborator

mhucka commented Jan 28, 2021

The interface for httpx Timeout changed last August (https://github.com/encode/httpx/releases/tag/0.14.0) and I guess I must have been testing against an older version of the library. I'll fix it and make a new release of CommonPy today.

@mhucka
Copy link
Collaborator

mhucka commented Jan 28, 2021

This should be fixed in version 1.3.0, just released.

@mhucka mhucka closed this as completed Jan 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Coding: bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants