sean-obrien / rpotter

Raspberry Potter - Use a wand to control the IoT (Internet of Things)
https://www.raspberrypotter.net/
MIT License
57 stars 51 forks source link

NameError: name 'stream' is not defined #14

Closed robboz4 closed 5 years ago

robboz4 commented 5 years ago

I now get this error: sudo python3 rpotter.py resetting points FindWand Error: name 'stream' is not defined Traceback (most recent call last): File "rpotter.py", line 79, in FindNewPoints data = np.fromstring(stream.getvalue(), dtype=np.uint8) NameError: name 'stream' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "rpotter.py", line 225, in Scan() File "rpotter.py", line 66, in Scan FindNewPoints() File "rpotter.py", line 101, in FindNewPoints End() File "rpotter.py", line 223, in End cam.close() NameError: name 'cam' is not defined

I'm going to look through the code as Python complained a lot about indentation issues, so I may have caused this by indenting or not indenting lines of code correctly.

ShortCipher commented 5 years ago

Hi @robboz4! Did you start with the complete disk image posted on www.raspberrypotter.net? I tried to do this yesterday, but the image seems to be corrupt. I was eventually able to unzip and convert the disk image, but I only had 8 GB microSD cards handy, so I haven't been able to burn and test it.

See closed issue #7 for my comment on how I was able to recover the image. Cheers!

robboz4 commented 5 years ago

Hi ShortCipher - I googled the error message and found another web site with a fix. I downloaded this code and after fixing the code for Python3 ( indent issues) I gave it running. So I'll mark this has closed. I didn't try the image download as I started with the original Make magazine article and followed that one. Next step is to get the wand working and the effects wired up.

Thanks for getting back to me.

Here is the link to the code I got running

https://bloggerbrothers.com/2017/12/09/turn-on-a-lamp-with-a-gesture-ir-cam-image-processing/

Once I have mine running like I want I'll post it up on GitHub.

Cheers

ShortCipher commented 5 years ago

Thanks for the link @robboz4! It looks like they made some improvements, including the ability to "train" new gestures. I'll have to check it out. I'm hoping to make two of these for my kids in time for Christmas. Cheers!