Uh oh!
There was an error while loading. Please reload this page.
Ignore PermissionError in netrc_info() - #810
Conversation
I'm running uWSGI, the user is "nobody", the netrc_file should be '~/.netrc'. But I don't know why, the location trunes out to be '/root/.netrc', so a PermissionError raised, it's better to ignore this error instead of to raise.
lovelydinosaur
commented
Feb 11, 2020
Okay. It's not super clear if it'd be better for us to ignore this, or to raise it, to ensure the user is aware of the issue. You can disable I suppose we should probably follow requests' lead here and silently ignore The build on this pull request is currently failing due to linter errors - make sure to run |
florimondmanca
left a comment
There was a problem hiding this comment.
Thanks! A couple of suggestions from me.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
florimondmanca
commented
Feb 11, 2020
@Jonney Also, were you able to debug this by using the |
Jonney
commented
Feb 11, 2020
It's ugly to use trust_env=False every time, if so, I want to use Requests instead of httpx |
Yes, it is. You can use a client=httpx.Client(trust_env=False)
response=client.get('https://example.org')asyncwithhttpx.AsyncClient(trust_env=False) asclient:
response=awaitclient.get('https://example.org')
Also, that suggestion was meant as a workaround, not a permanent solution. |
ignore (netrc.NetrcParseError, IOError, PermissionError)
Uh oh!
There was an error while loading. Please reload this page.
Co-Authored-By: Stephen Brown II <Stephen.Brown2@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.
Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>
lovelydinosaur
commented
Jul 30, 2020
Thanks so much! Now closed, see #1104 |
I'm running uWSGI, the user is "nobody", the netrc_file should be '~/.netrc'.
But I don't know why, the location trunes out to be '/root/.netrc', so a PermissionError raised, it's better to ignore this error instead of to raise.