Project

Profile

Help

Issue #2809

closed

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

Added by ehalcik almost 7 years ago. Updated about 3 years ago.

Status:
CLOSED - WONTFIX
Priority:
Low
Assignee:
-
Start date:
Due date:
Estimated time:
Severity:
1. Low
Version - Nectar:
Platform Release:
Target Release - Nectar:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

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.

Actions #1

Updated by bmbouter almost 7 years ago

  • Description updated (diff)

Add some escaping to the description.

Actions #2

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

Updated by bizhang almost 7 years ago

  • Tags deleted (Pulp 3)
Actions #4

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

Actions #5

Updated by ehalcik almost 7 years ago

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

Actions #6

Updated by ttereshc almost 7 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
Actions #8

Updated by ericbanaa19 about 5 years ago

  • File screenshot_1_1554358461.png added
  • File screenshot_2_1554358543.png added
  • File screenshot_3_1554358636.png added
Actions #9

Updated by mandyangelica about 5 years ago

  • File screenshot_1_1554378245.png added
  • File screenshot_2_1554378265.png added
Actions #10

Updated by tahminakhan about 5 years ago

  • File screenshot_5_1554841989.png added
Actions #11

Updated by bmbouter about 5 years ago

  • Status changed from NEW to CLOSED - WONTFIX
Actions #12

Updated by bmbouter about 5 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.

Actions #13

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added
Actions #14

Updated by carpetcleaningmelbourne almost 5 years ago

  • File clipboard-201905141432-3w6vb.png added
  • File clipboard-201905141433-ddzho.png added
Actions #15

Updated by melbournecentralcleaning almost 5 years ago

  • File clipboard-201905201408-6nexq.png added
Actions #16

Updated by carpetcleaningau almost 5 years ago

  • File clipboard-201905291558-tqtbq.png added
Actions #17

Updated by casparlee almost 5 years ago

  • File clipboard-201906261617-5fuqe.png added
  • File clipboard-201906261618-qfsmc.png added
Actions #18

Updated by finestediting over 4 years ago

  • File clipboard-201909041050-d0pft.png added
Actions #19

Updated by sellyourcar over 4 years ago

  • File clipboard-201909281152-uvmts.png added
Actions #20

Updated by denzelpaul05 over 4 years ago

  • File clipboard-201910031538-pqp4r.png added
Actions #21

Updated by riyanshaikh over 4 years ago

  • File clipboard-201910231549-wpaxs.png added
  • File clipboard-201910231549-opngk.png added
Actions #22

Updated by smithdaisy443 over 4 years ago

  • File clipboard-201911021809-hgohx.png added
  • File clipboard-201911021809-mwkgb.png added
  • File clipboard-201911021810-mgzce.png added
Actions #23

Updated by romandavis over 4 years ago

  • File clipboard-201912021239-jwosx.png added
  • File line-editor-in-her-office.jpg added
Actions #24

Updated by bmbouter over 4 years ago

  • File deleted (screenshot_1_1554358461.png)
Actions #25

Updated by bmbouter over 4 years ago

  • File deleted (screenshot_2_1554358543.png)
Actions #26

Updated by bmbouter over 4 years ago

  • File deleted (screenshot_3_1554358636.png)
Actions #27

Updated by Anonymous over 4 years ago

  • File best1cleaning logo.jpg added
Actions #28

Updated by ggainey about 3 years ago

  • File deleted (best1cleaning logo.jpg)
Actions #29

Updated by ggainey about 3 years ago

  • File deleted (screenshot_1_1554378245.png)
Actions #30

Updated by ggainey about 3 years ago

  • File deleted (screenshot_2_1554378265.png)
Actions #31

Updated by ggainey about 3 years ago

  • File deleted (screenshot_5_1554841989.png)
Actions #32

Updated by ggainey about 3 years ago

  • File deleted (clipboard-201905141432-3w6vb.png)
Actions #33

Updated by ggainey about 3 years ago

  • File deleted (clipboard-201905141433-ddzho.png)
Actions #34

Updated by ggainey about 3 years ago

  • File deleted (clipboard-201905201408-6nexq.png)
Actions #35

Updated by ggainey about 3 years ago

  • File deleted (clipboard-201905291558-tqtbq.png)
Actions #36

Updated by ggainey about 3 years ago

  • File deleted (clipboard-201906261617-5fuqe.png)
Actions #37

Updated by ggainey about 3 years ago

  • File deleted (clipboard-201906261618-qfsmc.png)
Actions #38

Updated by ggainey about 3 years ago

  • File deleted (clipboard-201909041050-d0pft.png)
Actions #39

Updated by ggainey about 3 years ago

  • File deleted (clipboard-201909281152-uvmts.png)
Actions #40

Updated by ggainey about 3 years ago

  • File deleted (clipboard-201910031538-pqp4r.png)
Actions #41

Updated by ggainey about 3 years ago

  • File deleted (clipboard-201910231549-wpaxs.png)
Actions #42

Updated by ggainey about 3 years ago

  • File deleted (clipboard-201910231549-opngk.png)
Actions #43

Updated by ggainey about 3 years ago

  • File deleted (clipboard-201911021809-hgohx.png)
Actions #44

Updated by ggainey about 3 years ago

  • File deleted (clipboard-201911021809-mwkgb.png)
Actions #45

Updated by ggainey about 3 years ago

  • File deleted (clipboard-201911021810-mgzce.png)
Actions #46

Updated by ggainey about 3 years ago

  • File deleted (clipboard-201912021239-jwosx.png)
Actions #47

Updated by ggainey about 3 years ago

  • File deleted (line-editor-in-her-office.jpg)

Also available in: Atom PDF