Print - SyntaxError: invalid syntax

Hi Piborg,

I recently rebuilt a Raspberry Pi W Zero and I'm now experiencing difficulty with the ZeroBorg.py file. The code was downloaded following instructions here https://www.piborg.org/blog/build/zeroborg-build/zeroborg-getting-started. I've attached a screenshot of the error I'm experiencing.

Thanks
Dan

Images: 
piborg's picture

The problem is that the standard copy of ZeroBorg.py is intended for Python 2 and you are using Python 3.

This is easily fixed, you just need the Python 3 compatible version instead :)

You can download the script to your Raspberry Pi with these commands:

cd ~/zeroborg
wget -O ZeroBorg3.py http://forum.piborg.org/sites/default/files/forum_upload/piborg/ZeroBorg3.txt
chmod +x *.py

Make sure you get the correct upper / lower case letters in the commands above, otherwise they will not work.

To use this version simply change the import line

import ZeroBorg

to be this instead

import ZeroBorg3 as ZeroBorg

Everything else should work the same as the standard version.

Hi piborg!

Thanks for quick reply, superb customer support! My ZeroBorg is now working perfect again!

Cheers,
Dan

Subscribe to Comments for "Print - SyntaxError: invalid syntax"