jeffwidman / bitbucket-issue-migration

A small script for migrating repo issues from Bitbucket to GitHub
GNU General Public License v3.0
314 stars 97 forks source link

Fails with SSL errors #12

Closed OzzieOrca closed 8 years ago

OzzieOrca commented 9 years ago

I believe Github has recently disabled SSL v3 and I am getting the following errors:

Traceback (most recent call last):
  File ".\migrate.py", line 177, in <module>
    ni = github.issues.create(issue_data, options.github_repo.split('/')[0], options.github_repo.split('/')[1] )
  File "E:\Python27\lib\site-packages\pygithub3\services\issues\__init__.py", line 101, in create
    return self._post(request)
  File "E:\Python27\lib\site-packages\pygithub3\services\base.py", line 138, in _post
    response = self._client.post(request, data=input_data, **kwargs)
  File "E:\Python27\lib\site-packages\pygithub3\core\client.py", line 88, in post
    response = self.request('post', request, **kwargs)
  File "E:\Python27\lib\site-packages\pygithub3\core\client.py", line 70, in wrapper
    return func(self, verb, request, **kwargs)
  File "E:\Python27\lib\site-packages\pygithub3\core\client.py", line 76, in request
    response = self.requester.request(verb, request, **kwargs)
  File "E:\Python27\lib\site-packages\requests\sessions.py", line 252, in request
    r.send(prefetch=prefetch)
  File "E:\Python27\lib\site-packages\requests\models.py", line 632, in send
    raise SSLError(e)
requests.exceptions.SSLError: [Errno 8] _ssl.c:507: EOF occurred in violation of protocol

Following the instructions at https://lukasa.co.uk/2013/01/Choosing_SSL_Version_In_Requests/ and putting the 3rd code snippet at the top of migrate.py gets rid of that error (as long as you upgrade the requests package to >=1.0.0) but then there is a dependency mismatch with the requests package and I get the following error:

Traceback (most recent call last):
  File ".\migrate.py", line 72, in <module>
    github = Github(login=options.github_username, password=github_password)
  File "E:\Python27\lib\site-packages\pygithub3\github.py", line 25, in __init__
    self._users = User(**config)
  File "E:\Python27\lib\site-packages\pygithub3\services\users\__init__.py", line 14, in __init__
    self.keys = Keys(**config)
  File "E:\Python27\lib\site-packages\pygithub3\services\base.py", line 40, in __init__
    self._client = Client(**config)
  File "E:\Python27\lib\site-packages\pygithub3\core\client.py", line 28, in __init__
    self.__set_params(self.config)
  File "E:\Python27\lib\site-packages\pygithub3\core\client.py", line 56, in __set_params
    self.requester.params.append(per_page)
AttributeError: 'dict' object has no attribute 'append'
haysclark commented 9 years ago

+1

jeffwidman commented 8 years ago

25 drastically overhauled the script to use the new Github import API instead of pygithub3 so I think this is no longer relevant.