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

AttributeError: 'NoneType' object has no attribute 'Response' #18

Closed
yingmu52 opened this issue May 22, 2020 · 2 comments
Closed

AttributeError: 'NoneType' object has no attribute 'Response' #18

yingmu52 opened this issue May 22, 2020 · 2 comments

Comments

@yingmu52
Copy link

Traceback (most recent call last):
  File "/usr/local/bin/netsuite", line 5, in <module>
    from netsuite.__main__ import main
  File "/usr/local/lib/python3.7/site-packages/netsuite/__init__.py", line 4, in <module>
    from .client import NetSuite  # noqa
  File "/usr/local/lib/python3.7/site-packages/netsuite/client.py", line 19, in <module>
    from .rest_api import NetSuiteRestApi
  File "/usr/local/lib/python3.7/site-packages/netsuite/rest_api.py", line 38, in <module>
    class NetSuiteRestApi:
  File "/usr/local/lib/python3.7/site-packages/netsuite/rest_api.py", line 139, in NetSuiteRestApi
    ) -> httpx.Response:
AttributeError: 'NoneType' object has no attribute 'Response'

I am getting this error, and I am not sure why.

@wwatkinson
Copy link

@yingmu52 this is due to an issue with a new file in the latest version of the package. I recommend moving back to version 0.4.1 of the package.

@jmagnusson FYI the latest version of the package is unusable due to the try/except around the import httpx statement meaning that sometimes httpx = None, which breaks the httpx.Response type hint on line 140.

@jacobsvante
Copy link
Owner

@yingmu52 @wwatkinson This should be fixed in 0.5.3. Available on PyPI now.

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

3 participants