Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Python3 fails with basic auth credentials in API URL #392

Open
vrajmohan opened this issue Apr 17, 2018 · 1 comment
Open

Python3 fails with basic auth credentials in API URL #392

vrajmohan opened this issue Apr 17, 2018 · 1 comment

Comments

@vrajmohan
Copy link
Contributor

vrajmohan commented Apr 17, 2018

With python3, if the pipeline command is invoked with an http(s) URL output, and if basic auth credentials are supplied using the URL pattern https://user:password@rest-of-api-url, it may fail due to psf/requests#4168 with the following message:

Traceback (most recent call last):
  File "/Users/cory/.pyenv/versions/3.6.0/lib/python3.6/encodings/idna.py", line 165, in encode
    raise UnicodeError("label empty or too long")
UnicodeError: label empty or too long

On the FEC project, we worked around this issue by creating a .netrc file with basic auth credentials. See https://github.com/fecgov/fec-eregs/blob/develop/README.md#loading-fecs-regulations

@vrajmohan
Copy link
Contributor Author

Optional arguments for credentials could be a solution.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant