|
Post by toomuchfuel on May 14, 2014 22:12:58 GMT -8
pi@raspberrypi ~/RasPiConnectServer $ sudo sh startserver.sh numid=3,iface=MIXER,name='PCM Playback Route' ; type=INTEGER,access=rw------,values=1,min=0,max=2,step=0 : values=1 192.168.20.101:9600/Traceback (most recent call last): File "RasPiConnectServer.py", line 322, in <module> app.run() File "/usr/local/lib/python2.7/dist-packages/web.py-0.37-py2.7.egg/web/application.py", line 313, in run return wsgi.runwsgi(self.wsgifunc(*middleware)) File "/usr/local/lib/python2.7/dist-packages/web.py-0.37-py2.7.egg/web/wsgi.py", line 54, in runwsgi return httpserver.runsimple(func, validip(listget(sys.argv, 1, ''))) File "/usr/local/lib/python2.7/dist-packages/web.py-0.37-py2.7.egg/web/httpserver.py", line 157, in runsimple server.start() File "/usr/local/lib/python2.7/dist-packages/web.py-0.37-py2.7.egg/web/wsgiserver/__init__.py", line 1753, in start raise socket.error(msg) socket.error: No socket could be created pi@raspberrypi ~/RasPiConnectServer $
|
|
|
Post by SDL on May 15, 2014 10:12:37 GMT -8
Hi toomuchfuel,
The clue is "No socket could be created".
I think you have another copy of the server running in the background.
1) type "ps xaf | grep python" to see if RasPiConnect is running. if it is, kill it with "sudo kill -9 'process id from ps xaf command' "
like:
sudo kill -9 3033
where "3033" is the process id from the ps xaf command.
BP
|
|
|
Post by toomuchfuel on May 19, 2014 0:47:54 GMT -8
Ok, I did what you said and it appeared that two servers were running, did the kill process, then ran a test to see if anything was running, results below: pi@raspberrypi ~ $ ps xaf | grep python 2235 pts/0 S+ 0:00 \_ grep --color=auto python pi@raspberrypi ~ $ sudo kill -9 2235 pi@raspberrypi ~ $ ps xaf | grep python 2239 pts/0 S+ 0:00 \_ grep --color=auto python pi@raspberrypi ~ $ cd RasPiConnectServer pi@raspberrypi ~/RasPiConnectServer $ sudo sh startserver.sh numid=3,iface=MIXER,name='PCM Playback Route' ; type=INTEGER,access=rw------,values=1,min=0,max=2,step=0 : values=1 192.168.20.101:9600/Then here it just hangs, is there an issues with my config.py file maybe?
|
|
|
Post by SDL on May 19, 2014 7:56:17 GMT -8
toomuchfuel,
You set debug to true, correct?
Yes, this is correct. It will sit there until it gets a request. It's not really hanging. Try the testing sequence in the documentation. It looks like it is working to me.
Best regards,
BP
|
|
|
Post by toomuchfuel on May 19, 2014 10:56:41 GMT -8
On my 'Server Report' my 'local pi home' url circle is red, but prior to all this it was green and showing voltage also etc
|
|
|
Post by SDL on May 19, 2014 13:21:34 GMT -8
toomuchfuel, Have you done this? From the documentation: Testing Testing the RasPiConnectServer To test that your RasPiConnectServer is running correctly, do one of the following: On your Raspberry Pi, type into a web browser: port number>/Version example: OR On another computer (on the same local network), type into a web browser IP Address>:<Your port number>/Version example: 192.168.1.130:9600/VersionTo find out your local IP number type: ifconfig If you see "RasPiConnectServer Version X.Y", then you are successfully running the RasPiConnectServer Your IP number looks "funny" but not necessarily wrong. Best regards, BP
|
|
|
Post by toomuchfuel on May 19, 2014 18:08:36 GMT -8
Yes I have and it shows the version so I would assume its running, however I have a red circle under server report and also when i change any of the panel setup and press validate, i get a red circle
|
|
|
Post by toomuchfuel on May 19, 2014 18:31:32 GMT -8
Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/web.py-0.37-py2.7.egg/web/application.py", line 239, in process return self.handle() File "/usr/local/lib/python2.7/dist-packages/web.py-0.37-py2.7.egg/web/application.py", line 230, in handle return self._delegate(fn, self.fvars, args) File "/usr/local/lib/python2.7/dist-packages/web.py-0.37-py2.7.egg/web/application.py", line 420, in _delegate return handle_class(cls) File "/usr/local/lib/python2.7/dist-packages/web.py-0.37-py2.7.egg/web/application.py", line 396, in handle_class return tocall(*args) File "/home/pi/RasPiConnectServer/RasPiConnectServer.py", line 177, in POST import Local File "/home/pi/RasPiConnectServer/Local.py", line 72 if (Config.debug()): ^ IndentationError: unexpected indent
192.168.20.102:56468 - - [18/Apr/2014 15:21:39] "HTTP/1.1 POST /raspi" - 500 Internal Server Error
|
|
|
Post by SDL on May 20, 2014 20:08:12 GMT -8
toomuchfuel,
You need to correct your Python syntax error in line 72 of Local.py. Your indenting is off.
If you can't find it, post your entire Local.py file, but use the code button to preserve your indenting.
Best regards,
BP
|
|
|
Post by toomuchfuel on May 20, 2014 22:43:07 GMT -8
toomuchfuel, You need to correct your Python syntax error in line 72 of Local.py. Your indenting is off. If you can't find it, post your entire Local.py file, but use the code button to preserve your indenting. Best regards, BP I have only used the original file you so kindly first created for me Attachments:Local.py (2.33 KB)
|
|
|
Post by toomuchfuel on May 21, 2014 17:27:40 GMT -8
I fixed it using WingIDE, now just gotta learn python, can you suggest the best route to do so?
|
|
|
Post by SDL on May 22, 2014 10:07:03 GMT -8
Toomuchfuel,
Glad you are getting there!
I'd recommend Programming the Raspberry Pi: Getting Started with Python by Simon Monk.
I've read his stuff. It's a good introduction.
Best regards,
BP
|
|