Closed hans-peter123 closed 10 years ago
Did you already add new commands and which Python version are you running?
No, the version is newly installed. I started the server with python3.
Okay, can you try to run python3 and enter version() after that to get the version of Python 3.
Sorry I can't, this shows up:
pi@pi ~ $ python3 Python 3.2.3 (default, Mar 1 2013, 11:53:50) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information.
version() Traceback (most recent call last): File "
", line 1, in NameError: name 'version' is not defined
My mistake ;) , but anyway it returned that you are running Python 3.2.3. It is the same version I'm running on my raspberry pi. Did you already try to open the file using nano commands.py
? Could you also read the encoding by running file -bi commands.py
and post the output here?
I'm currently not shure why the problem occours. Do you work locally on the raspberry pi or did you connect over SSH?
I am connected over SSH. Yes, I can open the the commands.py and the output is: file -bi commands.py
It is possible that an error has occurred during compile?
Should I try it again directly on the pi?
You can try it directly on the Pi. This would ensure that there aren't any encoding issues over SSH. If this doesn't help try to download the Siri API source code again. Maybe there was just an error during the transfer. If this also does not help the problem might be in your Python3 installation. You could try to reinstall it by running apt-get remove python3
and after that apt-get install python3
. Don't forget to reboot your Pi after that.
The compilation process can't cause the problem because it is of squid proxy and not of Siri API
Many many thanks, now everything works perfectly After I setup my Raspberry new and execute all commands directly on the Pi.
Thank you for these cool software! :)
Hi, I have a problem when I execute this command:
sudo python3 server.py
This error shows: pi@pi ~/Siri-API $ sudo python3 server.py Traceback (most recent call last): File "server.py", line 7, in
from commands import commands
File "/home/pi/Siri-API/commands.py", line 1, in
from document import document
File "/home/pi/Siri-API/document.py", line 10, in
import urllib.request
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb2 in position 44: invalid start byte
pi@pi ~/Siri-API $
On my other server, no Raspberry, all works perfekt. (But I have not completed because I wanted to bring the server to be running on the Raspberry Pi)
What I have to do?
Thans for your help :)