Project

Profile

Help

Issue #2809

Logging fails in case of non-ascii characters in the url

Added by ehalcik almost 2 years ago. Updated 1 day ago.

Status:
NEW
Priority:
Low
Assignee:
-
Sprint/Milestone:
-
Severity:
1. Low
Version - Nectar:
Platform Release:
Blocks Release:
Target Release - Nectar:
OS:
Backwards Incompatible:
No
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:

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.

History

#1 Updated by bmbouter almost 2 years ago

  • Description updated (diff)

Add some escaping to the description.

#2 Updated by bmbouter almost 2 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)

#3 Updated by bizhang almost 2 years ago

  • Tags deleted (Pulp 3)

#4 Updated by ttereshc almost 2 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.

#5 Updated by ehalcik almost 2 years ago

Thank you ! I'll watch for the additional characters next time .. This is now working for me

#6 Updated by ttereshc almost 2 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 (pulp-admin)
  • Priority changed from Normal to Low
  • Severity changed from 2. Medium to 1. Low
  • Triaged changed from No to Yes

#7 Updated by pthomas@redhat.com almost 2 years ago

  • Smash Test set to 684

#8 Updated by sarahtaylor 2 months ago

Should we have special character in URL with Unicode? And I that good idea special character with URL Unicode I have to Write My Dissertation upon Unicode but I don't have any kind of information Unicode.

#9 Updated by thomas about 1 month ago

I have a craze to learn about this uni-code I saw many tutorials of it but didn't get valid information or maybe I am not getting this in a perfect way. I hope with the help of guidance of Buy Essay at Cheap hope to achieve great information and it makes me clear concept about Unicode.

#10 Updated by danieljamez 8 days ago

Best top dissertation writing services uk at cheapable rates, and also academic papers, research writing and other writing services. Never compromise with your future contact us right now.

https://www.dissertationpros.co.uk/

#11 Updated by WillardZheng 1 day ago

I am hoping with the assist of steering of desire to gain remarkable statistics and it makes me clean idea approximately Unicode. I have a craze to study UK Dissertation Editing Service this uni-code I noticed many tutorials of it but didn't get valid information or maybe I am not getting this in a really perfect manner.

Please register to edit this issue

Also available in: Atom PDF