Issue #2809
closedLogging fails in case of non-ascii characters in the url
Description
i have a repo defined as :
pulp-admin rpm repo create --repo-id=oel-addons-x86_64-6 --feed=http://yum.oracle.com/repo/OracleLinux/OL6/addons/x86_64/ --relative-url=addons/oel/x86_64/6 --description "oel-addons-x86_64-6" --serve-http=true
Issuing the command pulp-admin rpm repo sync run --repo-id=oel-addons-x86_64-6
results in this error.
Task Failed
'ascii' codec can't decode byte 0xc3 in position 48: ordinal not in range(128)
/var/log/messages says this:
pulp: celery.worker.job:ERROR: (14295-74720) Task pulp.server.managers.repo.sync.sync[7f04fd3b-d2d8-4b8b-ad1a-f30816a6e095] raised unexpected: UnicodeDecodeError('ascii', 'Downloading metadata from http://yum.oracle.com/\xc3\xa2\xc2\x80\xc2\x8brepo/\xc3\xa2\xc2\x80\xc2\x8bOracleLinux/\xc3\xa2\xc2\x80\xc2\x8bOL6/\xc3\xa2\xc2\x80\xc2\x8baddons/\xc3\xa2\xc2\x80\xc2\x8bx86_64/.', 48, 49, 'ordinal not in range(128)')
My other repos sync just fine.
Updated by bmbouter over 6 years ago
- Description updated (diff)
Add some escaping to the description.
Updated by bmbouter over 6 years ago
I was able to reproduce this from the commands in the ticket. Here is the traceback I received.
nectar.downloaders.threaded:ERROR: (14604-28416) 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128)
nectar.downloaders.threaded:ERROR: (14604-28416) Traceback (most recent call last):
nectar.downloaders.threaded:ERROR: (14604-28416) File "/usr/lib/python2.7/site-packages/nectar/downloaders/threaded.py", line 267, in _fetch
nectar.downloaders.threaded:ERROR: (14604-28416) _logger.debug("Attempting to connect to {url}.".format(url=request.url))
nectar.downloaders.threaded:ERROR: (14604-28416) UnicodeEncodeError: 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128)
nectar.downloaders.threaded:ERROR: [246f51cc] (14604-42720) 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128)
nectar.downloaders.threaded:ERROR: [246f51cc] (14604-42720) Traceback (most recent call last):
nectar.downloaders.threaded:ERROR: [246f51cc] (14604-42720) File "/usr/lib/python2.7/site-packages/nectar/downloaders/threaded.py", line 267, in _fetch
nectar.downloaders.threaded:ERROR: [246f51cc] (14604-42720) _logger.debug("Attempting to connect to {url}.".format(url=request.url))
nectar.downloaders.threaded:ERROR: [246f51cc] (14604-42720) UnicodeEncodeError: 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128)
nectar.downloaders.threaded:ERROR: (14604-28416) 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128)
nectar.downloaders.threaded:ERROR: (14604-28416) Traceback (most recent call last):
nectar.downloaders.threaded:ERROR: (14604-28416) File "/usr/lib/python2.7/site-packages/nectar/downloaders/threaded.py", line 267, in _fetch
nectar.downloaders.threaded:ERROR: (14604-28416) _logger.debug("Attempting to connect to {url}.".format(url=request.url))
nectar.downloaders.threaded:ERROR: (14604-28416) UnicodeEncodeError: 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128)
nectar.downloaders.threaded:ERROR: [246f51cc] (14604-42720) 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128)
nectar.downloaders.threaded:ERROR: [246f51cc] (14604-42720) Traceback (most recent call last):
nectar.downloaders.threaded:ERROR: [246f51cc] (14604-42720) File "/usr/lib/python2.7/site-packages/nectar/downloaders/threaded.py", line 267, in _fetch
nectar.downloaders.threaded:ERROR: [246f51cc] (14604-42720) _logger.debug("Attempting to connect to {url}.".format(url=request.url))
nectar.downloaders.threaded:ERROR: [246f51cc] (14604-42720) UnicodeEncodeError: 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128)
nectar.downloaders.threaded:ERROR: (14604-35712) 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128)
nectar.downloaders.threaded:ERROR: (14604-35712) Traceback (most recent call last):
nectar.downloaders.threaded:ERROR: (14604-35712) File "/usr/lib/python2.7/site-packages/nectar/downloaders/threaded.py", line 267, in _fetch
nectar.downloaders.threaded:ERROR: (14604-35712) _logger.debug("Attempting to connect to {url}.".format(url=request.url))
nectar.downloaders.threaded:ERROR: (14604-35712) UnicodeEncodeError: 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128)
nectar.downloaders.threaded:ERROR: [246f51cc] (14604-42720) 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128)
nectar.downloaders.threaded:ERROR: [246f51cc] (14604-42720) Traceback (most recent call last):
nectar.downloaders.threaded:ERROR: [246f51cc] (14604-42720) File "/usr/lib/python2.7/site-packages/nectar/downloaders/threaded.py", line 267, in _fetch
nectar.downloaders.threaded:ERROR: [246f51cc] (14604-42720) _logger.debug("Attempting to connect to {url}.".format(url=request.url))
nectar.downloaders.threaded:ERROR: [246f51cc] (14604-42720) UnicodeEncodeError: 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128)
nectar.downloaders.threaded:ERROR: (14604-28416) 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128)
nectar.downloaders.threaded:ERROR: (14604-28416) Traceback (most recent call last):
nectar.downloaders.threaded:ERROR: (14604-28416) File "/usr/lib/python2.7/site-packages/nectar/downloaders/threaded.py", line 267, in _fetch
nectar.downloaders.threaded:ERROR: (14604-28416) _logger.debug("Attempting to connect to {url}.".format(url=request.url))
nectar.downloaders.threaded:ERROR: (14604-28416) UnicodeEncodeError: 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128)
pulp_rpm.plugins.importers.yum.sync:INFO: [246f51cc] Downloading additional units.
nectar.downloaders.threaded:ERROR: (14604-35712) 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128)
nectar.downloaders.threaded:ERROR: (14604-35712) Traceback (most recent call last):
nectar.downloaders.threaded:ERROR: (14604-35712) File "/usr/lib/python2.7/site-packages/nectar/downloaders/threaded.py", line 267, in _fetch
nectar.downloaders.threaded:ERROR: (14604-35712) _logger.debug("Attempting to connect to {url}.".format(url=request.url))
nectar.downloaders.threaded:ERROR: (14604-35712) UnicodeEncodeError: 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128)
nectar.downloaders.threaded:ERROR: (14604-28416) 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128)
nectar.downloaders.threaded:ERROR: (14604-28416) Traceback (most recent call last):
nectar.downloaders.threaded:ERROR: (14604-28416) File "/usr/lib/python2.7/site-packages/nectar/downloaders/threaded.py", line 267, in _fetch
nectar.downloaders.threaded:ERROR: (14604-28416) _logger.debug("Attempting to connect to {url}.".format(url=request.url))
nectar.downloaders.threaded:ERROR: (14604-28416) UnicodeEncodeError: 'ascii' codec can't encode characters in position 22-24: ordinal not in range(128)
Updated by ttereshc over 6 years ago
@ehalcik, the issue is in the encoding of the url which was provided to pulp I guess.
You can see that there are some additional characters in url:
$ od -a
http://yum.oracle.com/repo/OracleLinux/OL6/addons/x86_64/
0000000 h t t p : / / y u m . o r a c l
0000020 e . c o m / b nul vt r e p o / b nul
0000040 vt O r a c l e L i n u x / b nul vt
0000060 O L 6 / b nul vt a d d o n s / b nul
You can update your repo with a proper feed (without any additional characters), just copy-paste this:
pulp-admin rpm repo update --feed http://yum.oracle.com/repo/OracleLinux/OL6/addons/x86_64/ --repo-id oel-addons-x86_64-6
To double-check this ^ url:
$ od -a
http://yum.oracle.com/repo/OracleLinux/OL6/addons/x86_64/
0000000 h t t p : / / y u m . o r a c l
0000020 e . c o m / r e p o / O r a c l
0000040 e L i n u x / O L 6 / a d d o n
Then re-sync, it works for me.
Updated by ehalcik over 6 years ago
Thank you ! I'll watch for the additional characters next time .. This is now working for me
Updated by ttereshc over 6 years ago
- Project changed from Pulp to Nectar
- Subject changed from getting an error "'ascii' codec can't decode byte 0xc3 in position 48: ordinal not in range(128)" when syncing a repository to Logging fails in case of non-ascii characters in the url
- Category deleted (
15) - Priority changed from Normal to Low
- Severity changed from 2. Medium to 1. Low
- Triaged changed from No to Yes
Updated by ericbanaa19 over 4 years ago
- File screenshot_1_1554358461.png added
- File screenshot_2_1554358543.png added
- File screenshot_3_1554358636.png added
Updated by mandyangelica over 4 years ago
- File screenshot_1_1554378245.png added
- File screenshot_2_1554378265.png added
Updated by bmbouter over 4 years ago
- Status changed from NEW to CLOSED - WONTFIX
Updated by bmbouter over 4 years ago
Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.
Updated by carpetcleaningmelbourne over 4 years ago
- File clipboard-201905141432-3w6vb.png added
- File clipboard-201905141433-ddzho.png added
Updated by melbournecentralcleaning over 4 years ago
- File clipboard-201905201408-6nexq.png added
Updated by carpetcleaningau over 4 years ago
- File clipboard-201905291558-tqtbq.png added
Updated by casparlee about 4 years ago
- File clipboard-201906261617-5fuqe.png added
- File clipboard-201906261618-qfsmc.png added
Updated by finestediting about 4 years ago
- File clipboard-201909041050-d0pft.png added
Updated by sellyourcar almost 4 years ago
- File clipboard-201909281152-uvmts.png added
Updated by denzelpaul05 almost 4 years ago
- File clipboard-201910031538-pqp4r.png added
Updated by riyanshaikh almost 4 years ago
- File clipboard-201910231549-wpaxs.png added
- File clipboard-201910231549-opngk.png added
Updated by smithdaisy443 almost 4 years ago
- File clipboard-201911021809-hgohx.png added
- File clipboard-201911021809-mwkgb.png added
- File clipboard-201911021810-mgzce.png added
Updated by romandavis almost 4 years ago
- File clipboard-201912021239-jwosx.png added
- File line-editor-in-her-office.jpg added
Updated by bmbouter almost 4 years ago
- File deleted (
screenshot_1_1554358461.png)
Updated by bmbouter almost 4 years ago
- File deleted (
screenshot_2_1554358543.png)
Updated by bmbouter almost 4 years ago
- File deleted (
screenshot_3_1554358636.png)
Updated by ggainey over 2 years ago
- File deleted (
clipboard-201905141432-3w6vb.png)
Updated by ggainey over 2 years ago
- File deleted (
clipboard-201905141433-ddzho.png)
Updated by ggainey over 2 years ago
- File deleted (
clipboard-201905201408-6nexq.png)
Updated by ggainey over 2 years ago
- File deleted (
clipboard-201905291558-tqtbq.png)
Updated by ggainey over 2 years ago
- File deleted (
clipboard-201906261617-5fuqe.png)
Updated by ggainey over 2 years ago
- File deleted (
clipboard-201906261618-qfsmc.png)
Updated by ggainey over 2 years ago
- File deleted (
clipboard-201909041050-d0pft.png)
Updated by ggainey over 2 years ago
- File deleted (
clipboard-201909281152-uvmts.png)
Updated by ggainey over 2 years ago
- File deleted (
clipboard-201910031538-pqp4r.png)
Updated by ggainey over 2 years ago
- File deleted (
clipboard-201910231549-wpaxs.png)
Updated by ggainey over 2 years ago
- File deleted (
clipboard-201910231549-opngk.png)
Updated by ggainey over 2 years ago
- File deleted (
clipboard-201911021809-hgohx.png)
Updated by ggainey over 2 years ago
- File deleted (
clipboard-201911021809-mwkgb.png)
Updated by ggainey over 2 years ago
- File deleted (
clipboard-201911021810-mgzce.png)
Updated by ggainey over 2 years ago
- File deleted (
clipboard-201912021239-jwosx.png)
Updated by ggainey over 2 years ago
- File deleted (
line-editor-in-her-office.jpg)