Answer the question
In order to leave comments, you need to log in
Is it possible to bypass the download of the image for further processing?
The program is supposed to process the image at the given URL.
Data contains a URL as a list element
. Now I write the received data to a file, then I open it again (in the same code) and perform the necessary manipulations.
Is something similar as described below possible?
img2 = requests.get(data[1].strip()[0:-6])
img = io.imread(img2.content)
"TypeError: a bytes-like object is required, not 'str'"
Traceback (most recent call last):
File "C:\Py\Projects\1\photoexec.py", line 40, in <module>
b = bytearray.fromhex(img2.content)
TypeError: fromhex() argument must be str, not bytes
Answer the question
In order to leave comments, you need to log in
Thanks for the help sim3x
https://2.python-requests.org/en/master/user/quick...img = io.imread(BytesIO(img2.content))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question