Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@agargiulo
Copy link

Updated from python 2.x to python 3 using python-modernize

@agargiulo
Copy link
Author

I am using the python3 version for a script, and when I run it, I get this output:

[~/GitHub-Backup] % python3 ./github-backup.py agargiulo backups
Traceback (most recent call last):
  File "./github-backup.py", line 30, in <module>
    main()
  File "./github-backup.py", line 24, in main
    user_repos = gh.repos.list(args.username).all()
  File "/usr/lib/python3.2/site-packages/pygithub3-0.3-py3.2.egg/pygithub3/core/result/base.py", line 110, in all
    return list(self.iterator())
  File "/usr/lib/python3.2/site-packages/pygithub3-0.3-py3.2.egg/pygithub3/core/result/base.py", line 105, in iterator
    for page in self:
  File "/usr/lib/python3.2/site-packages/pygithub3-0.3-py3.2.egg/pygithub3/core/result/smart.py", line 91, in __next__
    if self.page <= self.pages:
  File "/usr/lib/python3.2/site-packages/pygithub3-0.3-py3.2.egg/pygithub3/core/result/smart.py", line 101, in pages
    return self.getter.last
  File "/usr/lib/python3.2/site-packages/pygithub3-0.3-py3.2.egg/pygithub3/core/result/smart.py", line 47, in last
    self()
  File "/usr/lib/python3.2/site-packages/pygithub3-0.3-py3.2.egg/pygithub3/core/result/smart.py", line 16, in wrapper
    return func(self, page)
  File "/usr/lib/python3.2/site-packages/pygithub3-0.3-py3.2.egg/pygithub3/core/result/smart.py", line 41, in __call__
    self.cache[str(page)] = self.resource.loads(response.content)
  File "/usr/lib/python3.2/site-packages/pygithub3-0.3-py3.2.egg/pygithub3/resources/base.py", line 33, in loads
    resource_chunk = json.loads(json_content)
  File "/usr/lib/python3.2/json/__init__.py", line 309, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.2/json/decoder.py", line 351, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: can't use a string pattern on a bytes-like object

The code is here: github-backup.py

@ralphbean
Copy link
Owner

I ended up having to re-do this in eceebd5

I'm afraid I can't merge it due to strange merge conflicts upstream. Thanks, though!

@ralphbean ralphbean closed this Jun 26, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.