You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I can see this error if I have: query_string > 2036. As I can see the problem in pyga.requsts.py in build_http_requestlink to method
So, as you can see when query_string > 2036 we try to use post and set query_string as a data post = query_string. Than it raise this error.
Error stack-trace:
File "pyga/requests.py", line 880, in track_event
request.fire()
File "pyga/requests.py", line 110, in fire
self.__send()
File "pyga/requests.py", line 96, in __send
request, timeout=self.config.request_timeout)
File "/usr/local/lib/python3.7/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/lib/python3.7/urllib/request.py", line 523, in open
req = meth(req)
File "/usr/local/lib/python3.7/urllib/request.py", line 1280, in do_request_
raise TypeError(msg)
TypeError: POST data should be bytes, an iterable of bytes, or a file object. It cannot be of type str.
To Reproduce
Steps to reproduce the behavior:
Use Python3.7
Build http request where query_string > 2036 and use this library
See error
Expected behavior
It should not give an error.
The text was updated successfully, but these errors were encountered:
yurabysaha
changed the title
Python3.7: TypeError: POST data should be bytes, an iterable of bytes, or a file object. It cannot be of type str. when I query_string > 2036have
Python3.7: TypeError: POST data should be bytes, an iterable of bytes, or a file object. It cannot be of type str. when I have query_string > 2036
Apr 17, 2022
Describe the bug
I can see this error if I have:
query_string > 2036
. As I can see the problem inpyga.requsts.py
inbuild_http_request
link to methodSo, as you can see when query_string > 2036 we try to use post and set query_string as a data
post = query_string
. Than it raise this error.Error stack-trace:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should not give an error.
The text was updated successfully, but these errors were encountered: