{"action":"created","issue":{"url":"https://api.github.com/repos/discogs/discogs_client/issues/55","labels_url":"https://api.github.com/repos/discogs/discogs_client/issues/55/labels{/name}","comments_url":"https://api.github.com/repos/discogs/discogs_client/issues/55/comments","events_url":"https://api.github.com/repos/discogs/discogs_client/issues/55/events","html_url":"https://github.com/discogs/discogs_client/issues/55","id":84650654,"number":55,"title":"TypeError: __repr__ returned non-string (type bytes)","user":{"login":"tchakravarty","id":2289192,"avatar_url":"https://avatars.githubusercontent.com/u/2289192?v=3","gravatar_id":"","url":"https://api.github.com/users/tchakravarty","html_url":"https://github.com/tchakravarty","followers_url":"https://api.github.com/users/tchakravarty/followers","following_url":"https://api.github.com/users/tchakravarty/following{/other_user}","gists_url":"https://api.github.com/users/tchakravarty/gists{/gist_id}","starred_url":"https://api.github.com/users/tchakravarty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tchakravarty/subscriptions","organizations_url":"https://api.github.com/users/tchakravarty/orgs","repos_url":"https://api.github.com/users/tchakravarty/repos","events_url":"https://api.github.com/users/tchakravarty/events{/privacy}","received_events_url":"https://api.github.com/users/tchakravarty/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-03T16:28:59Z","updated_at":"2015-06-03T16:49:54Z","closed_at":null,"body":"Here is a minimal example of my attempts to interact with the Discogs API:\r\n\r\n```{python}\r\nfrom SensitiveInformation.discogs_application_info import provide_discogs_auth, provide_verifier\r\nimport discogs_client\r\n\r\ndiscogs_consumer_key, discogs_consumer_secret = provide_discogs_auth()\r\ndiscogs = discogs_client.Client(user_agent=\"ThoughfulMachineLearning\",\r\n                                consumer_key=discogs_consumer_key,\r\n                          consumer_secret=discogs_consumer_secret)\r\ndiscogs_auth_url = discogs.get_authorize_url()\r\ndiscogs.get_access_token(verifier=provide_verifier())\r\ndiscogs.identity()\r\n```\r\n\r\nThe functions `provide_discogs_auth` and `provide_verifier` simply return the consumer key & secret and the verifier from user authorization. `get_access_token` returns the access key and secret as expected.\r\n\r\nHowever, on the last line, when I make an API call, I get:\r\n\r\n```{python}\r\nOut[38]: In[39]: discogs.identity()\r\nTraceback (most recent call last):\r\nOut[39]:   File \"/usr/local/lib/python3.4/dist-packages/IPython/core/formatters.py\", line 219, in catch_format_error\r\n    r = method(self, *args, **kwargs)\r\n  File \"/usr/local/lib/python3.4/dist-packages/IPython/core/formatters.py\", line 690, in __call__\r\n    printer.pretty(obj)\r\n  File \"/usr/local/lib/python3.4/dist-packages/IPython/lib/pretty.py\", line 407, in pretty\r\n    return _default_pprint(obj, self, cycle)\r\n  File \"/usr/local/lib/python3.4/dist-packages/IPython/lib/pretty.py\", line 527, in _default_pprint\r\n    _repr_pprint(obj, p, cycle)\r\n  File \"/usr/local/lib/python3.4/dist-packages/IPython/lib/pretty.py\", line 709, in _repr_pprint\r\n    output = repr(obj)\r\nTypeError: __repr__ returned non-string (type bytes)\r\n```\r\n\r\nNot sure if this is related to IPython or the client library, but would appreciate help either way. Thanks. "},"comment":{"url":"https://api.github.com/repos/discogs/discogs_client/issues/comments/108520593","html_url":"https://github.com/discogs/discogs_client/issues/55#issuecomment-108520593","issue_url":"https://api.github.com/repos/discogs/discogs_client/issues/55","id":108520593,"user":{"login":"rodneykeeling","id":452042,"avatar_url":"https://avatars.githubusercontent.com/u/452042?v=3","gravatar_id":"","url":"https://api.github.com/users/rodneykeeling","html_url":"https://github.com/rodneykeeling","followers_url":"https://api.github.com/users/rodneykeeling/followers","following_url":"https://api.github.com/users/rodneykeeling/following{/other_user}","gists_url":"https://api.github.com/users/rodneykeeling/gists{/gist_id}","starred_url":"https://api.github.com/users/rodneykeeling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rodneykeeling/subscriptions","organizations_url":"https://api.github.com/users/rodneykeeling/orgs","repos_url":"https://api.github.com/users/rodneykeeling/repos","events_url":"https://api.github.com/users/rodneykeeling/events{/privacy}","received_events_url":"https://api.github.com/users/rodneykeeling/received_events","type":"User","site_admin":false},"created_at":"2015-06-03T16:49:54Z","updated_at":"2015-06-03T16:49:54Z","body":"Hi @tchakravarty,\r\n\r\nI haven't seen this issue before. I use IPython quite a lot myself and haven't seen this. Are you using an IPython shell (i.e., `ipython -i`) or IPython Notebook? My suggestion would be to put a break point (`import ipdb; ipdb.set_trace()`) before the line `output = repr(obj)` and inspect the `obj` variable. That appears to be the wrong type, so perhaps inspecting it a bit could provide some clues.\r\n\r\nLet me know if you find anything.\r\n\r\nThanks,\r\nRodney"}}