Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1453118 - Pulp - Nectar - UnicodeEncodeError raised on connecting to a website with non latin-1 characters in credentials
Summary: Pulp - Nectar - UnicodeEncodeError raised on connecting to a website with non...
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: 6.2.9
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-22 08:23 UTC by Roman Plevka
Modified: 2021-07-21 14:32 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-01 12:51:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Pulp Redmine 2771 0 Normal NEW UnicodeEncodeError raised on connecting to a website with non latin-1 characters in credentials 2017-05-22 21:04:09 UTC

Description Roman Plevka 2017-05-22 08:23:02 UTC
Description of problem:

the only way on how to sync an HTTP-authed repo in katello is to provide the credentials in the URL in a form of:
`http://username:password@domain.com`.

This is causing nectar to fail if any of the username or password contains unicode characters.
e.g.:

```
# hammer --csv repository create --name foo --product-id 1 --organization-id 1 --content-type yum --url "http://%F0%A0%BB%8E%F0%AB%84%B7%F0%A7%B0%A8%E4%97%B2%E6%96%BA%F0%A2%A4%B8%F0%A1%99%8F%E3%9E%8C%ED%9B%BA%EC%A9%A5:%F0%A4%85%AF%F0%A5%91%A2%F0%A2%B3%A4%EA%B5%A9%F0%90%AC%84%F0%A6%B3%94%EC%85%BE%F0%A6%B6%8D%EC%9A%B3%F0%A4%99%A4@rplevka.fedorapeople.org/fakerepo01/"

# hammer -u admin -p changeme repository synchronize --id 1
[..............................................................................................................] [100%]
No new packages.
Error: RPM1004: Error retrieving metadata: 'latin-1' codec can't encode characters in position 0-9: ordinal not in range(256)
```

syslog traceback:
```
May 18 12:04:25 foo.bar pulp: kombu.transport.qpid:INFO: Connected to qpid with SASL mechanism ANONYMOUS
May 18 12:04:25 foo.bar pulp: kombu.transport.qpid:INFO: Connected to qpid with SASL mechanism ANONYMOUS
May 18 12:04:25 foo.bar pulp: celery.worker.strategy:INFO: Received task: pulp.server.async.tasks._queue_reserved_task[8cdde2a4-d21a-4faf-8d33-74949dbba830]
May 18 12:04:25 foo.bar pulp: celery.worker.strategy:INFO: Received task: pulp.server.managers.repo.sync.sync[fff399b3-803a-40c5-bb03-0430b56f8f84]
May 18 12:04:25 foo.bar pulp: celery.worker.strategy:INFO: Received task: pulp.server.async.tasks._release_resource[9d594c8f-4fc5-4ae9-a707-b11b94d1f1ac]
May 18 12:04:25 foo.bar pulp: pulp_rpm.plugins.importers.yum.sync:INFO: Downloading metadata from http://rplevka.fedorapeople.org/fakerepo01/.
May 18 12:04:25 foo.bar pulp: celery.worker.job:INFO: Task pulp.server.async.tasks._queue_reserved_task[8cdde2a4-d21a-4faf-8d33-74949dbba830] succeeded in 0.0346152009997s: None
May 18 12:04:25 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784) 'latin-1' codec can't encode characters in position 0-9: ordinal not in range(256)
May 18 12:04:25 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784) Traceback (most recent call last):
May 18 12:04:25 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)   File "/usr/lib/python2.6/site-packages/nectar/downloaders/threaded.py", line 221, in _fetch
May 18 12:04:25 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)     self.config.read_timeout))
May 18 12:04:25 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)   File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 476, in get
May 18 12:04:25 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)     return self.request('GET', url, **kwargs)
May 18 12:04:25 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)   File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 450, in request
May 18 12:04:25 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)     prep = self.prepare_request(req)
May 18 12:04:25 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)   File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 381, in prepare_request
May 18 12:04:25 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)     hooks=merge_hooks(request.hooks, self.hooks),
May 18 12:04:25 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)   File "/usr/lib/python2.6/site-packages/requests/models.py", line 308, in prepare
May 18 12:04:25 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)     self.prepare_auth(auth, url)
May 18 12:04:25 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)   File "/usr/lib/python2.6/site-packages/requests/models.py", line 495, in prepare_auth
May 18 12:04:25 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)     r = auth(self)
May 18 12:04:25 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)   File "/usr/lib/python2.6/site-packages/nectar/config.py", line 243, in __call__
May 18 12:04:25 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)     req.headers['Authorization'] = requests.auth._basic_auth_str(self.username, self.password)
May 18 12:04:25 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)   File "/usr/lib/python2.6/site-packages/requests/auth.py", line 30, in _basic_auth_str
May 18 12:04:25 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)     b64encode(('%%s:%%s' %% (username, password)).encode('latin1')).strip()
May 18 12:04:25 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784) UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-9: ordinal not in range(256)
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752) 'latin-1' codec can't encode characters in position 0-9: ordinal not in range(256)
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752) Traceback (most recent call last):
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752)   File "/usr/lib/python2.6/site-packages/nectar/downloaders/threaded.py", line 221, in _fetch
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752)     self.config.read_timeout))
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752)   File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 476, in get
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752)     return self.request('GET', url, **kwargs)
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752)   File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 450, in request
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752)     prep = self.prepare_request(req)
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752)   File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 381, in prepare_request
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752)     hooks=merge_hooks(request.hooks, self.hooks),
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752)   File "/usr/lib/python2.6/site-packages/requests/models.py", line 308, in prepare
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752)     self.prepare_auth(auth, url)
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752)   File "/usr/lib/python2.6/site-packages/requests/models.py", line 495, in prepare_auth
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752)     r = auth(self)
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752)   File "/usr/lib/python2.6/site-packages/nectar/config.py", line 243, in __call__
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752)     req.headers['Authorization'] = requests.auth._basic_auth_str(self.username, self.password)
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752)   File "/usr/lib/python2.6/site-packages/requests/auth.py", line 30, in _basic_auth_str
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752)     b64encode(('%%s:%%s' %% (username, password)).encode('latin1')).strip()
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752) UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-9: ordinal not in range(256)
May 18 12:04:26 foo.bar pulp: pulp_rpm.plugins.importers.yum.sync:INFO: Downloading metadata from http://rplevka.fedorapeople.org/fakerepo01/.
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784) 'latin-1' codec can't encode characters in position 0-9: ordinal not in range(256)
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784) Traceback (most recent call last):
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)   File "/usr/lib/python2.6/site-packages/nectar/downloaders/threaded.py", line 221, in _fetch
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)     self.config.read_timeout))
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)   File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 476, in get
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)     return self.request('GET', url, **kwargs)
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)   File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 450, in request
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)     prep = self.prepare_request(req)
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)   File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 381, in prepare_request
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)     hooks=merge_hooks(request.hooks, self.hooks),
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)   File "/usr/lib/python2.6/site-packages/requests/models.py", line 308, in prepare
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)     self.prepare_auth(auth, url)
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)   File "/usr/lib/python2.6/site-packages/requests/models.py", line 495, in prepare_auth
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)     r = auth(self)
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)   File "/usr/lib/python2.6/site-packages/nectar/config.py", line 243, in __call__
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)     req.headers['Authorization'] = requests.auth._basic_auth_str(self.username, self.password)
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)   File "/usr/lib/python2.6/site-packages/requests/auth.py", line 30, in _basic_auth_str
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)     b64encode(('%%s:%%s' %% (username, password)).encode('latin1')).strip()
May 18 12:04:26 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784) UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-9: ordinal not in range(256)
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752) 'latin-1' codec can't encode characters in position 0-9: ordinal not in range(256)
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752) Traceback (most recent call last):
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752)   File "/usr/lib/python2.6/site-packages/nectar/downloaders/threaded.py", line 221, in _fetch
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752)     self.config.read_timeout))
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752)   File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 476, in get
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752)     return self.request('GET', url, **kwargs)
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752)   File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 450, in request
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752)     prep = self.prepare_request(req)
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752)   File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 381, in prepare_request
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752)     hooks=merge_hooks(request.hooks, self.hooks),
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752)   File "/usr/lib/python2.6/site-packages/requests/models.py", line 308, in prepare
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752)     self.prepare_auth(auth, url)
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752)   File "/usr/lib/python2.6/site-packages/requests/models.py", line 495, in prepare_auth
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752)     r = auth(self)
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752)   File "/usr/lib/python2.6/site-packages/nectar/config.py", line 243, in __call__
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752)     req.headers['Authorization'] = requests.auth._basic_auth_str(self.username, self.password)
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752)   File "/usr/lib/python2.6/site-packages/requests/auth.py", line 30, in _basic_auth_str
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752)     b64encode(('%%s:%%s' %% (username, password)).encode('latin1')).strip()
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-74752) UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-9: ordinal not in range(256)
May 18 12:04:27 foo.bar pulp: pulp_rpm.plugins.importers.yum.sync:INFO: Downloading metadata from http://rplevka.fedorapeople.org/fakerepo01/.
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784) 'latin-1' codec can't encode characters in position 0-9: ordinal not in range(256)
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784) Traceback (most recent call last):
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)   File "/usr/lib/python2.6/site-packages/nectar/downloaders/threaded.py", line 221, in _fetch
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)     self.config.read_timeout))
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)   File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 476, in get
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)     return self.request('GET', url, **kwargs)
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)   File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 450, in request
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)     prep = self.prepare_request(req)
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)   File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 381, in prepare_request
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)     hooks=merge_hooks(request.hooks, self.hooks),
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)   File "/usr/lib/python2.6/site-packages/requests/models.py", line 308, in prepare
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)     self.prepare_auth(auth, url)
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)   File "/usr/lib/python2.6/site-packages/requests/models.py", line 495, in prepare_auth
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)     r = auth(self)
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)   File "/usr/lib/python2.6/site-packages/nectar/config.py", line 243, in __call__
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)     req.headers['Authorization'] = requests.auth._basic_auth_str(self.username, self.password)
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)   File "/usr/lib/python2.6/site-packages/requests/auth.py", line 30, in _basic_auth_str
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784)     b64encode(('%%s:%%s' %% (username, password)).encode('latin1')).strip()
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-46784) UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-9: ordinal not in range(256)
May 18 12:04:27 foo.bar pulp: pulp_rpm.plugins.importers.yum.sync:INFO: Downloading additional units.
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752) 'latin-1' codec can't encode characters in position 0-9: ordinal not in range(256)
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752) Traceback (most recent call last):
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752)   File "/usr/lib/python2.6/site-packages/nectar/downloaders/threaded.py", line 221, in _fetch
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752)     self.config.read_timeout))
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752)   File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 476, in get
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752)     return self.request('GET', url, **kwargs)
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752)   File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 450, in request
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752)     prep = self.prepare_request(req)
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752)   File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 381, in prepare_request
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752)     hooks=merge_hooks(request.hooks, self.hooks),
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752)   File "/usr/lib/python2.6/site-packages/requests/models.py", line 308, in prepare
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752)     self.prepare_auth(auth, url)
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752)   File "/usr/lib/python2.6/site-packages/requests/models.py", line 495, in prepare_auth
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752)     r = auth(self)
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752)   File "/usr/lib/python2.6/site-packages/nectar/config.py", line 243, in __call__
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752)     req.headers['Authorization'] = requests.auth._basic_auth_str(self.username, self.password)
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752)   File "/usr/lib/python2.6/site-packages/requests/auth.py", line 30, in _basic_auth_str
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752)     b64encode(('%%s:%%s' %% (username, password)).encode('latin1')).strip()
May 18 12:04:27 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752) UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-9: ordinal not in range(256)
May 18 12:04:28 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752) 'latin-1' codec can't encode characters in position 0-9: ordinal not in range(256)
May 18 12:04:28 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752) Traceback (most recent call last):
May 18 12:04:28 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752)   File "/usr/lib/python2.6/site-packages/nectar/downloaders/threaded.py", line 221, in _fetch
May 18 12:04:28 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752)     self.config.read_timeout))
May 18 12:04:28 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752)   File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 476, in get
May 18 12:04:28 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752)     return self.request('GET', url, **kwargs)
May 18 12:04:28 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752)   File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 450, in request
May 18 12:04:28 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752)     prep = self.prepare_request(req)
May 18 12:04:28 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752)   File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 381, in prepare_request
May 18 12:04:28 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752)     hooks=merge_hooks(request.hooks, self.hooks),
May 18 12:04:28 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752)   File "/usr/lib/python2.6/site-packages/requests/models.py", line 308, in prepare
May 18 12:04:28 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752)     self.prepare_auth(auth, url)
May 18 12:04:28 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752)   File "/usr/lib/python2.6/site-packages/requests/models.py", line 495, in prepare_auth
May 18 12:04:28 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752)     r = auth(self)
May 18 12:04:28 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752)   File "/usr/lib/python2.6/site-packages/nectar/config.py", line 243, in __call__
May 18 12:04:28 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752)     req.headers['Authorization'] = requests.auth._basic_auth_str(self.username, self.password)
May 18 12:04:28 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752)   File "/usr/lib/python2.6/site-packages/requests/auth.py", line 30, in _basic_auth_str
May 18 12:04:28 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752)     b64encode(('%%s:%%s' %% (username, password)).encode('latin1')).strip()
May 18 12:04:28 foo.bar pulp: nectar.downloaders.threaded:ERROR: (26494-98752) UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-9: ordinal not in range(256)
May 18 12:04:29 foo.bar pulp: pulp.server.async.tasks:INFO: Task failed : [fff399b3-803a-40c5-bb03-0430b56f8f84] : Error retrieving metadata: 'latin-1' codec can't encode characters in position 0-9: ordinal not in range(256)
```


Version-Release number of selected component (if applicable):
sat 6.2.9

Steps to Reproduce:
1. create a product
2. create a repo using the above command
3. check the syslog (/var/log/messages)

Actual results:
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-9: ordinal not in range(256)
in syslog

Expected results:
no errors, latin-1 and unicode characters in credentials should not cause any trouble.

Additional info:
upstream tracker: https://pulp.plan.io/issues/2771

Comment 1 pulp-infra@redhat.com 2017-05-22 12:03:57 UTC
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.

Comment 2 pulp-infra@redhat.com 2017-05-22 12:03:59 UTC
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.

Comment 4 Brad Buckingham 2017-06-01 12:51:07 UTC
Based on triage discussion involving PM, ENG, QE and CEE, we are recommending to close this bugzilla as latin-1 is not currently supported.  We are marking it CLOSED:DEFERRED as support will be introduced if/when it is included as part of the upstream.


Note You need to log in before you can comment on or make changes to this bug.