Issue while testing 1.1.3 on a Pi2

Posted by TheExpertNoob 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
Issue while testing 1.1.3 on a Pi2
October 08, 2017 06:00AM
Im getting this error. i will look into the issue more later. Bedtime now.

Oct 08 05:47:17 mediabox piratebox_alt[5995]:   File "psogen.py", line 81
Oct 08 05:47:17 mediabox piratebox_alt[5995]:     print htmlstring
Oct 08 05:47:17 mediabox piratebox_alt[5995]:                    ^
Oct 08 05:47:17 mediabox piratebox_alt[5995]: SyntaxError: Missing parentheses in call to 'print'
Oct 08 05:47:17 mediabox piratebox_alt[5995]:   File "diskusage.py", line 59
Oct 08 05:47:17 mediabox piratebox_alt[5995]:     print "CRITICAL: {} modified {} minutes ago. Threshold set to {} minutes. Cannot update.".format(drive, age.seconds/60, max_delay.seconds/60)
Oct 08 05:47:17 mediabox piratebox_alt[5995]:                                                                                             ^
Oct 08 05:47:17 mediabox piratebox_alt[5995]: SyntaxError: invalid syntax
Oct 08 05:47:18 mediabox piratebox_alt[5995]: Starting lighttpd...
Oct 08 05:47:18 mediabox piratebox_alt[5995]: 0



Other than that, things are looking good. I have a feeling it has something to do with updating python on a system update. Will troubleshoot more later.


PirateBox Installs:
2x Zsun's (both testing, one with serial interface)
A5-V11 (mostly for OpenWRT testing DIY)
2x RPi Zero's
(one active in car 24/7, gets a lot of hits at Walmart, movie theaters and the mall)
2x RPi3's (both home servers, one Ubuntu custom install along side a ton of other services)
1x RPi2 (currently work server)



Edited 1 time(s). Last edit at 10/08/2017 06:04AM by TheExpertNoob.
Re: Issue while testing 1.1.3 on a Pi2
October 08, 2017 04:05PM
As I suspected my system uses python3 by default for Samba.
I can changed two lines in shoutbox_stuff.sh from
python psogen.py generate
python diskusage.py generate
to
python2 psogen.py generate
python2 diskusage.py generate

and seemed to fix it....except for droopy which I assume is still using python3 in piratebox_alt. Not sure how to clarify python2 in the start-stop-daemon

the above may only be true on systems with python2 and python3 installed. /usr/bin/python was simlinked to /usr/bin/python3 which is how I discovered that. If I change the python simlink, it breaks samba(wins, netbios, filesharing, and a few other programs I have installed that use python3).


PirateBox Installs:
2x Zsun's (both testing, one with serial interface)
A5-V11 (mostly for OpenWRT testing DIY)
2x RPi Zero's
(one active in car 24/7, gets a lot of hits at Walmart, movie theaters and the mall)
2x RPi3's (both home servers, one Ubuntu custom install along side a ton of other services)
1x RPi2 (currently work server)



Edited 2 time(s). Last edit at 10/08/2017 05:20PM by TheExpertNoob.
Re: Issue while testing 1.1.3 on a Pi2
October 08, 2017 05:01PM
fixed droopy by adding '/usr/bin/python2' after -x and before the droopy file. However this method when killed will kill ALL scripts using python2 when piratebox is stopped as it kills python2 globally.

Looks like we need to find a way to implement python2 instead of system default python if both v2 & v3 are installed or update python scripts for python 3.... maybe just clarify python 2 would be easier.


PirateBox Installs:
2x Zsun's (both testing, one with serial interface)
A5-V11 (mostly for OpenWRT testing DIY)
2x RPi Zero's
(one active in car 24/7, gets a lot of hits at Walmart, movie theaters and the mall)
2x RPi3's (both home servers, one Ubuntu custom install along side a ton of other services)
1x RPi2 (currently work server)



Edited 4 time(s). Last edit at 10/08/2017 05:22PM by TheExpertNoob.
Re: Issue while testing 1.1.3 on a Pi2
October 08, 2017 05:38PM
hmm.... but still some minor issues with the shoutbox and disk usage. Shoutbox wont accept any input and the button is stuck on 'sending...' as well as the disk refresh button stuck on 'refreshing...'

EDIT: Had to change the python path in lighttpd.conf to python2 as well.


PirateBox Installs:
2x Zsun's (both testing, one with serial interface)
A5-V11 (mostly for OpenWRT testing DIY)
2x RPi Zero's
(one active in car 24/7, gets a lot of hits at Walmart, movie theaters and the mall)
2x RPi3's (both home servers, one Ubuntu custom install along side a ton of other services)
1x RPi2 (currently work server)



Edited 1 time(s). Last edit at 10/08/2017 05:40PM by TheExpertNoob.
Re: Issue while testing 1.1.3 on a Pi2
October 11, 2017 01:36PM
Ok, this is a major issue which we need to address.
Crap.
Re: Issue while testing 1.1.3 on a Pi2
October 12, 2017 02:03AM
It SEEMS so far all the changes I made above fixed it. I haven't had any adverse affects when stopping piratebox interfering with other services un-related to piratebox that are running on my RPi2 (transmission, samba) So it seems Piratebox is the only thing on my RPi2 that uses python2. So changing all the links in code above to a hard link to /usr/bin/python2 should work. As the only thing constantly using python2 is droopy (only thing that prefers /usr/bin/pythoin2 as start-stop-daemon like hard links). All the other links/scripts only call on python2 to execure calls then kill themselves when completed. ex: python2 psogen.py generate runs then dies, adding anything to the shoutbox calls psowrite.py then dies after writing to the generated chat file.


PirateBox Installs:
2x Zsun's (both testing, one with serial interface)
A5-V11 (mostly for OpenWRT testing DIY)
2x RPi Zero's
(one active in car 24/7, gets a lot of hits at Walmart, movie theaters and the mall)
2x RPi3's (both home servers, one Ubuntu custom install along side a ton of other services)
1x RPi2 (currently work server)
Re: Issue while testing 1.1.3 on a Pi2
November 26, 2017 07:38AM
Q: Did that happen to a manual installation of PirateBox or
after performing an update?
Re: Issue while testing 1.1.3 on a Pi2
December 03, 2017 12:41AM
apt-get update was ran, but not apt-get-upgrade (just needed to update package lists) Other than that, this was a clean install on a Raspberry Pi from the raspi .img


PirateBox Installs:
2x Zsun's (both testing, one with serial interface)
A5-V11 (mostly for OpenWRT testing DIY)
2x RPi Zero's
(one active in car 24/7, gets a lot of hits at Walmart, movie theaters and the mall)
2x RPi3's (both home servers, one Ubuntu custom install along side a ton of other services)
1x RPi2 (currently work server)



Edited 1 time(s). Last edit at 12/03/2017 12:42AM by TheExpertNoob.
Re: Issue while testing 1.1.3 on a Pi2
December 03, 2017 07:16AM
If it is the official PirateBox image, you can't run apt-get because it is for debian/raspbian
Re: Issue while testing 1.1.3 on a Pi2
December 05, 2017 01:35AM
Matthias Wrote:
-------------------------------------------------------
> If it is the official PirateBox image, you can't
> run apt-get because it is for debian/raspbian


er...right... the equivalent... pacman I think? I'm in and out of this project way too much.... and I think it updated at as dependency of Samba... which I believe on Arch ARM is actually smdb.service If my memory serves me correctly.... and now that i think of it (experience since then) I used pacman-Sy instead of pacman -Syu which would indeed cause dependency issues. But still not quite sure how python 3 got there if I told it not to install the dependencies (-u) Its been too long ago. I will have to try and recreate it when I have free time... most likely the end of the month.


PirateBox Installs:
2x Zsun's (both testing, one with serial interface)
A5-V11 (mostly for OpenWRT testing DIY)
2x RPi Zero's
(one active in car 24/7, gets a lot of hits at Walmart, movie theaters and the mall)
2x RPi3's (both home servers, one Ubuntu custom install along side a ton of other services)
1x RPi2 (currently work server)



Edited 2 time(s). Last edit at 12/05/2017 01:40AM by TheExpertNoob.
Re: Issue while testing 1.1.3 on a Pi2
December 05, 2017 05:19AM
Don't waste your time :-)
I already applied the suggested change. (hardcode python2). You can try to build a dev. image for the RPi based on the development branch and give that a try.
Re: Issue while testing 1.1.3 on a Pi2
December 06, 2017 12:23AM
Will do when I have the time. I will report (along with debug checklist) when I do.


PirateBox Installs:
2x Zsun's (both testing, one with serial interface)
A5-V11 (mostly for OpenWRT testing DIY)
2x RPi Zero's
(one active in car 24/7, gets a lot of hits at Walmart, movie theaters and the mall)
2x RPi3's (both home servers, one Ubuntu custom install along side a ton of other services)
1x RPi2 (currently work server)
Re: Issue while testing 1.1.3 on a Pi2
December 06, 2017 05:00PM
cloned arch_rpi_image_prepare development
make ARCH=rpi (rpi2) BRANCH=development VERSION=1.2.0
seems it still processes the 1.1.3 version even though I pulled from the development branch of piratebox-ws (verified the files on my drive) I suppose that is written in the rpi image prepare and not pulled from piratebox-ws? Anywho, building from my environment at work.


PirateBox Installs:
2x Zsun's (both testing, one with serial interface)
A5-V11 (mostly for OpenWRT testing DIY)
2x RPi Zero's
(one active in car 24/7, gets a lot of hits at Walmart, movie theaters and the mall)
2x RPi3's (both home servers, one Ubuntu custom install along side a ton of other services)
1x RPi2 (currently work server)
Re: Issue while testing 1.1.3 on a Pi2
December 06, 2017 07:52PM
ah oh, sorry. Stupid me. It's about the repository arch_rpi_image_prepare
make dist ARCH=$arch BRANCH=development VERSION=1.2-alpha

or use the autobuild script, which creates RPi1 and RPi2+3 images

 ./build_all.sh -b development -v 1.2-alpha

The version is more like a label, nothing else.

Sorry, best regards
Matthias