#28 [documentation] Don't include http:// or https:// in fedorahosted URL
Closed: Fixed 7 years ago Opened 7 years ago by jflory7.

Problem

When running the Pagure importer, you have to exclude the http:// or https:// when importing from fedorahosted or else you receive a httplib.InvalidURL error.

Analysis

The error I received before removing the protocol is as follows.

pgimport fedorahosted https://fedorahosted.org/fedora-commops --tags
Enter you FAS Username: jflory7
Enter your FAS password: 
#### Repo available ####
1 - pagure-importer-test.git
2 - fedora-marketing.git
3 - fedora-commops.git

Choose the import destination repo (default 1) : 1
Traceback (most recent call last):
  File "/usr/bin/pgimport", line 9, in <module>
    load_entry_point('pagure-importer==1.1.0', 'console_scripts', 'pgimport')()
  File "/usr/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pagure_importer/commands/fedorahosted.py", line 27, in fedorahosted
    trac_importer.import_issues(repo_name=repo_name, repo_folder=REPO_PATH)
  File "/usr/lib/python2.7/site-packages/pagure_importer/utils/importer_trac.py", line 19, in import_issues
    tickets_id = self.trac.ticket.query(trac_query)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1243, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1602, in __request
    verbose=self.__verbose
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1283, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1303, in single_request
    h = self.make_connection(host)
  File "/usr/lib64/python2.7/xmlrpclib.py", line 1520, in make_connection
    self._connection = host, HTTPS(chost, None, context=self.context, **(x509 or {}))
  File "/usr/lib64/python2.7/httplib.py", line 1258, in __init__
    source_address)
  File "/usr/lib64/python2.7/httplib.py", line 751, in __init__
    (self.host, self.port) = self._get_hostport(host, port)
  File "/usr/lib64/python2.7/httplib.py", line 792, in _get_hostport
    raise InvalidURL("nonnumeric port: '%s'" % host[i+1:])
httplib.InvalidURL: nonnumeric port: '$EJG'

I discovered online that this issue appears to be with httplib and I needed to remove the protocol for this to work. After doing so, the stacktrace resolved itself.


Just kidding. I got the json-rpc branch working on my system, and I see this is no longer a problem.

:100: :100: :100:

@cverna++

This issue can be closed

@cverna changed the status to Fixed

7 years ago

Login to comment on this ticket.

Metadata