How to solve error with bottlenose getting an empty object: expected string or bytes-like objectI'm getting an error when trying to open a website url with Python 3.1, urllib & json: operation was attempted on something that is not a socketHow to handle urllib's timeout in Python 3?Python download images with alernating variablesurlib.request.urlopen not accepting query string with spacesurllib.request fails on urlopen of unicode stringcan't upload > ~2GB to Google Cloud StorageURLError: <urlopen error [Errno 11001] getaddrinfo failed>,why?failing at downloading an image with “urllib.request.urlretrieve” in Pythonnltk.data.load('/…/…', format = 'raw') error
Why did NASA use Imperial units?
What happens if an IRB mistakenly approves unethical research?
what to say when a company asks you why someone (a friend) who was fired left?
Why are there not any MRI machines available in Interstellar?
I have a domain, static IP address and many devices I'd like to access outside my house. How do I route them?
Why are angular mometum and angular velocity not necessarily parallel, but linear momentum and linear velocity are always parallel?
How do changes to your speed that occur on your own turn affect your available movement?
Why is chess failing to attract big name sponsors?
What happens when two cards both modify what I'm allowed to do?
Is it OK to accept a job opportunity while planning on not taking it?
Considerations when providing money to one child now, and the other later?
In a script how can I signal who's winning the argument?
The 50,000 row query limit is not actually a "per APEX call" as widely believed
Why is DC so, so, so Democratic?
Where is this photo of a group of hikers taken? Is it really in the Ural?
Using "Kollege" as "university friend"?
Other than a swing wing, what types of variable geometry have flown?
How could an engineer advance human civilization by time traveling to the past?
Found more old paper shares from broken up companies
If a check is written for bill, but account number is not mentioned on memo line, is it still processed?
High income and difficulty during interviews
dos2unix is unable to convert typescript file to unix format
Grid/table with lots of buttons
Are symplectomorphisms of Weil–Petersson symplectic form induced from surface diffeomorphisms?
How to solve error with bottlenose getting an empty object: expected string or bytes-like object
I'm getting an error when trying to open a website url with Python 3.1, urllib & json: operation was attempted on something that is not a socketHow to handle urllib's timeout in Python 3?Python download images with alernating variablesurlib.request.urlopen not accepting query string with spacesurllib.request fails on urlopen of unicode stringcan't upload > ~2GB to Google Cloud StorageURLError: <urlopen error [Errno 11001] getaddrinfo failed>,why?failing at downloading an image with “urllib.request.urlretrieve” in Pythonnltk.data.load('/…/…', format = 'raw') error
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I'm running my code on a server, and the connection to Amazon works correct when I first boot at the server, but after some requests it fails all the time. If I restart the server it starts working again, but then fails on the same previous situation. I've tried changing the IP from the server, to check if my IP was blocked. But that wasn't the case. I'm not getting a clear error from the API, only an empty object error, so I can't figure out how to solve the issue.
Here is the error:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/amazon/api.py", line 174, in lookup
response = self.api.ItemLookup(ResponseGroup=ResponseGroup, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/bottlenose/api.py", line 274, in __call__
'api_url': api_url, 'cache_url': cache_url)
File "/usr/local/lib/python3.5/dist-packages/bottlenose/api.py", line 235, in _call_api
return urllib2.urlopen(api_request, timeout=self.Timeout)
File "/usr/lib/python3.5/urllib/request.py", line 163, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.5/urllib/request.py", line 466, in open
response = self._open(req, data)
File "/usr/lib/python3.5/urllib/request.py", line 484, in _open
'_open', req)
File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
result = func(*args)
File "/usr/lib/python3.5/urllib/request.py", line 1297, in https_open
context=self._context, check_hostname=self._check_hostname)
File "/usr/lib/python3.5/urllib/request.py", line 1254, in do_open
h.request(req.get_method(), req.selector, req.data, headers)
File "/usr/lib/python3.5/http/client.py", line 1107, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.5/http/client.py", line 1147, in _send_request
self.putheader(hdr, value)
File "/usr/lib/python3.5/http/client.py", line 1083, in putheader
if _is_illegal_header_value(values[i]):
TypeError: expected string or bytes-like object
Thanks a lot!
python amazon-product-api bottlenose
add a comment |
I'm running my code on a server, and the connection to Amazon works correct when I first boot at the server, but after some requests it fails all the time. If I restart the server it starts working again, but then fails on the same previous situation. I've tried changing the IP from the server, to check if my IP was blocked. But that wasn't the case. I'm not getting a clear error from the API, only an empty object error, so I can't figure out how to solve the issue.
Here is the error:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/amazon/api.py", line 174, in lookup
response = self.api.ItemLookup(ResponseGroup=ResponseGroup, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/bottlenose/api.py", line 274, in __call__
'api_url': api_url, 'cache_url': cache_url)
File "/usr/local/lib/python3.5/dist-packages/bottlenose/api.py", line 235, in _call_api
return urllib2.urlopen(api_request, timeout=self.Timeout)
File "/usr/lib/python3.5/urllib/request.py", line 163, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.5/urllib/request.py", line 466, in open
response = self._open(req, data)
File "/usr/lib/python3.5/urllib/request.py", line 484, in _open
'_open', req)
File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
result = func(*args)
File "/usr/lib/python3.5/urllib/request.py", line 1297, in https_open
context=self._context, check_hostname=self._check_hostname)
File "/usr/lib/python3.5/urllib/request.py", line 1254, in do_open
h.request(req.get_method(), req.selector, req.data, headers)
File "/usr/lib/python3.5/http/client.py", line 1107, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.5/http/client.py", line 1147, in _send_request
self.putheader(hdr, value)
File "/usr/lib/python3.5/http/client.py", line 1083, in putheader
if _is_illegal_header_value(values[i]):
TypeError: expected string or bytes-like object
Thanks a lot!
python amazon-product-api bottlenose
1
Have you tried editing the file client.py and get a trace running inside right before line 1083? Maybe see what format that header is comming in as?
– RockAndRoleCoder
Mar 26 at 15:31
Thanks for your suggestion, I will try to get more information with that method.
– sergio_teula
Mar 26 at 23:02
add a comment |
I'm running my code on a server, and the connection to Amazon works correct when I first boot at the server, but after some requests it fails all the time. If I restart the server it starts working again, but then fails on the same previous situation. I've tried changing the IP from the server, to check if my IP was blocked. But that wasn't the case. I'm not getting a clear error from the API, only an empty object error, so I can't figure out how to solve the issue.
Here is the error:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/amazon/api.py", line 174, in lookup
response = self.api.ItemLookup(ResponseGroup=ResponseGroup, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/bottlenose/api.py", line 274, in __call__
'api_url': api_url, 'cache_url': cache_url)
File "/usr/local/lib/python3.5/dist-packages/bottlenose/api.py", line 235, in _call_api
return urllib2.urlopen(api_request, timeout=self.Timeout)
File "/usr/lib/python3.5/urllib/request.py", line 163, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.5/urllib/request.py", line 466, in open
response = self._open(req, data)
File "/usr/lib/python3.5/urllib/request.py", line 484, in _open
'_open', req)
File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
result = func(*args)
File "/usr/lib/python3.5/urllib/request.py", line 1297, in https_open
context=self._context, check_hostname=self._check_hostname)
File "/usr/lib/python3.5/urllib/request.py", line 1254, in do_open
h.request(req.get_method(), req.selector, req.data, headers)
File "/usr/lib/python3.5/http/client.py", line 1107, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.5/http/client.py", line 1147, in _send_request
self.putheader(hdr, value)
File "/usr/lib/python3.5/http/client.py", line 1083, in putheader
if _is_illegal_header_value(values[i]):
TypeError: expected string or bytes-like object
Thanks a lot!
python amazon-product-api bottlenose
I'm running my code on a server, and the connection to Amazon works correct when I first boot at the server, but after some requests it fails all the time. If I restart the server it starts working again, but then fails on the same previous situation. I've tried changing the IP from the server, to check if my IP was blocked. But that wasn't the case. I'm not getting a clear error from the API, only an empty object error, so I can't figure out how to solve the issue.
Here is the error:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/amazon/api.py", line 174, in lookup
response = self.api.ItemLookup(ResponseGroup=ResponseGroup, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/bottlenose/api.py", line 274, in __call__
'api_url': api_url, 'cache_url': cache_url)
File "/usr/local/lib/python3.5/dist-packages/bottlenose/api.py", line 235, in _call_api
return urllib2.urlopen(api_request, timeout=self.Timeout)
File "/usr/lib/python3.5/urllib/request.py", line 163, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.5/urllib/request.py", line 466, in open
response = self._open(req, data)
File "/usr/lib/python3.5/urllib/request.py", line 484, in _open
'_open', req)
File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
result = func(*args)
File "/usr/lib/python3.5/urllib/request.py", line 1297, in https_open
context=self._context, check_hostname=self._check_hostname)
File "/usr/lib/python3.5/urllib/request.py", line 1254, in do_open
h.request(req.get_method(), req.selector, req.data, headers)
File "/usr/lib/python3.5/http/client.py", line 1107, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.5/http/client.py", line 1147, in _send_request
self.putheader(hdr, value)
File "/usr/lib/python3.5/http/client.py", line 1083, in putheader
if _is_illegal_header_value(values[i]):
TypeError: expected string or bytes-like object
Thanks a lot!
python amazon-product-api bottlenose
python amazon-product-api bottlenose
asked Mar 26 at 15:17
sergio_teulasergio_teula
64 bronze badges
64 bronze badges
1
Have you tried editing the file client.py and get a trace running inside right before line 1083? Maybe see what format that header is comming in as?
– RockAndRoleCoder
Mar 26 at 15:31
Thanks for your suggestion, I will try to get more information with that method.
– sergio_teula
Mar 26 at 23:02
add a comment |
1
Have you tried editing the file client.py and get a trace running inside right before line 1083? Maybe see what format that header is comming in as?
– RockAndRoleCoder
Mar 26 at 15:31
Thanks for your suggestion, I will try to get more information with that method.
– sergio_teula
Mar 26 at 23:02
1
1
Have you tried editing the file client.py and get a trace running inside right before line 1083? Maybe see what format that header is comming in as?
– RockAndRoleCoder
Mar 26 at 15:31
Have you tried editing the file client.py and get a trace running inside right before line 1083? Maybe see what format that header is comming in as?
– RockAndRoleCoder
Mar 26 at 15:31
Thanks for your suggestion, I will try to get more information with that method.
– sergio_teula
Mar 26 at 23:02
Thanks for your suggestion, I will try to get more information with that method.
– sergio_teula
Mar 26 at 23:02
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55360630%2fhow-to-solve-error-with-bottlenose-getting-an-empty-object-expected-string-or-b%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55360630%2fhow-to-solve-error-with-bottlenose-getting-an-empty-object-expected-string-or-b%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Have you tried editing the file client.py and get a trace running inside right before line 1083? Maybe see what format that header is comming in as?
– RockAndRoleCoder
Mar 26 at 15:31
Thanks for your suggestion, I will try to get more information with that method.
– sergio_teula
Mar 26 at 23:02