-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
app crashes after running search_tags #75
Comments
Hello,
|
Thanks @MisterFruits for the analysis, that helps a lot :) I pushed a potential fix, could you test current master? |
It's working for me now after a
|
Great. I released version 0.2.1 with a fix. https://pypi.python.org/pypi/orochi |
Orochi crashes by running the search_tags command under python3.5 and python2.7 under debian.
`(8tracks)> search_tags rock
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/requests/utils.py", line 796, in check_header_validity
if not pat.match(value):
TypeError: expected string or bytes-like object
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/orochi", line 11, in
sys.exit(main())
File "/usr/local/lib/python3.5/dist-packages/orochi/client.py", line 862, in main
client.cmdloop()
File "/usr/local/lib/python3.5/dist-packages/orochi/client.py", line 216, in cmdloop
super(Client, self).cmdloop()
File "/usr/lib/python3.5/cmd.py", line 138, in cmdloop
stop = self.onecmd(line)
File "/usr/lib/python3.5/cmd.py", line 217, in onecmd
return func(arg)
File "/usr/local/lib/python3.5/dist-packages/orochi/client.py", line 268, in do_search_tags
mixes = self.search_request(s, 'tag')
File "/usr/local/lib/python3.5/dist-packages/orochi/client.py", line 500, in search_request
self.config['results_sorting'], self._search_results_page, self._results_per_page)
File "/usr/local/lib/python3.5/dist-packages/orochi/api.py", line 176, in search_mix
data = self._get(resource, params)
File "/usr/local/lib/python3.5/dist-packages/orochi/api.py", line 60, in _get
r = self.s.get(self.base_url + resource, params=params, *_kwargs)
File "/usr/local/lib/python3.5/dist-packages/requests/sessions.py", line 488, in get
return self.request('GET', url, *_kwargs)
File "/usr/local/lib/python3.5/dist-packages/requests/sessions.py", line 461, in request
prep = self.prepare_request(req)
File "/usr/local/lib/python3.5/dist-packages/requests/sessions.py", line 394, in prepare_request
hooks=merge_hooks(request.hooks, self.hooks),
File "/usr/local/lib/python3.5/dist-packages/requests/models.py", line 295, in prepare
self.prepare_headers(headers)
File "/usr/local/lib/python3.5/dist-packages/requests/models.py", line 409, in prepare_headers
check_header_validity(header)
File "/usr/local/lib/python3.5/dist-packages/requests/utils.py", line 800, in check_header_validity
"not %s" % (value, type(value)))
requests.exceptions.InvalidHeader: Header value 2 must be of type str or bytes, not <class 'int'>
`
The text was updated successfully, but these errors were encountered: