-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
can't receive data from Rpi, instead it show errors #94
Comments
I think this is because Python3 handles str and bytes differently, change line 50 |
Thanks for the response .. it still showing error even thou after changing line 50
|
Every file handles streaming contains this line |
Will I did what you ask for both of the collecting data files. the
and the
I tried to run them over the terminal and the PyCharm but the same error are showing, and for your question |
Okay, a few more changes, Python3 treats temp = self.connection.read(1024)
print(type(temp)) But it seems the error you provided says it already - |
So, I was able to print the type of the stream_bytes, and a new error came up `Connection from: ('192.168.1.195', 53458) <class 'bytes'> |
I forgot to include the error that cam from the Rpi thru the SSH `Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): |
So, I was trying to figure out the error that I had, and came across a solution here https://stackoverflow.com/questions/19013961/cv2-imread-flags-not-found So for future reference for this error and this will show the video stream in gray by using @hamuchiwa thank you for your help, best wishes . . . |
Hi @hamuchiwa.
So, after modifying the IP and the port on "collect_training_data.py" to my computer local IP and port, and running it on my computer terminal using python command, it ran without errors, and was waiting for the data to be sent from the RPi, so I used SSH and ran "stream_client.py" using python command, after changing it's IP and port to my computer IP & port.
My computer's Terminal show's
Start collecting images...
for couple of seconds ..
then it print these errors
Traceback (most recent call last): File "collect_training_data.py", line 172, in <module> CollectTrainingData() File "collect_training_data.py", line 35, in __init__ self.collect_image() File "collect_training_data.py", line 53, in collect_image stream_bytes += self.connection.read(1024) TypeError: must be str, not bytes
Line 72 on collect_training_data.py
CollectTrainingData()
Line 35 on collect_training_data.py
self.collect_image()
Line 53 on collect_training_data.py
stream_bytes += self.connection.read(1024)
and on the ssh terminal "RPi" it shows
I appreciate your help, God bless u
The text was updated successfully, but these errors were encountered: