Closed XKRJAGUAR closed 8 years ago
Sure! lets troubleshoot this! First off, what OS are you on?
here are the dependencies that it makes sure you have: python, python-dev, python-requests, python-pip, supervisor, gunicorn, sqlite3, pyyaml, flask-sqlalchemy, flask-admin, evdev
depending on your OS: python, python-requests, and sqlite3 were probably already installed, so you can just do:
pip uninstall flask pyyaml flask-sqlalchemy flask-admin evdev sudo apt-get remove python-dev python-requests, python pip
then: sudo nano /etc/rc.local and remove the line that look something like this: python "$SCRIPTPATH"/GPioneer.py &>/dev/null &
that should get you back to square one.
Hi, thanks for the speedy reply, I am running raspian (shows up as linux Linux 3.18.11+ ) after running each line of code, there seemed to be some problems. upon entering the first line it replied "Cannot uninstall requirement flask, not installed Storing complete log in /home/pi/.pip/pip.log"
on the next line I was replied to with "E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem." i ran the sudo dpkg... line as it told me to and it did something but upon entering the sudo nano /etc/rc.local there is no line even mentioning gpioneer. it still wont let me reinstall it or anything.
also to note when i enter "bash bash gpioneer/install.sh" I am greeted with many many lines saying thins such as "warning: no previously-included files matching '*.pyo' found under directory 'examples'" it says this for lot of different file names etcetera.
I try running these lines a few times to no avail, I am almost certain a re install would fix it as the file system was not expanded when i first installed it
it sounds like the files never installed in the first place. It creates the line in rc.local pretty early on, so if that line isn't there, then the script must have prematurely ended. The warnings are ok, they can be ignored. You only need to be concerned if there are any 'error:' messages.
you said that you are doing:
bash bash gpioneer/install.sh
Make sure that you only have one 'bash' in there, but try elevating your privileges like this:
sudo bash gpioneer/install.sh
sorry, I didn't mean to type "bash bash", I tried using sudo bash but still doesn't fix anything, it gets to the blue menu but again when I try to use any of the configure gpioneer commands, it just comes back with no such file or directory, any suggestions?
does it list which file is missing?
I decided to reset the SD card completely and install it again, unfortunately the exact same problem! If for example I type in- "sudo python GPioneer.py -c"
I get the message- "python: can't open file 'GPioneer.py': [Errno 2] No such file or directory"
the line that you mentioned is now in the rc.local file now however so that's a change
Upon looking into the files using winSCP, I can see that there is now a GPioneer folder which is full of files, this did not exists before so this is progress but I still get the same error for some reason
ah yes, if you are going to run the configuration manually, you first need to change directory into the gpioneer folder. so do this:
cd ~/gpioneer sudo python GPioneer.py -c
well, id prefer if it ran automatically but it doesn't seem to... ill give that a try though!
it should have automatically run after installation
gave it a try, it doesn't refuse the command so it is obviously correct but nothing happens
when you say run automatically, what is supposed to happen after I use the bash command?
is it possible you could give me a slightly more in depth run through of what should happen after I enter 'y' to start the configuration?
if I type in my IP into a web browser I am greeted with "sqlalchemy.exc.OperationalError"
"OperationalError: (sqlite3.OperationalError) no such table: gpioneer [SQL: u'SELECT count(?) AS count_1 \nFROM gpioneer'] [parameters: ('*',)]"
not sure if this is of any relevance to help solving the problem?
I'll look into and get back to you monday afternoon
thanks
So after you press 'y' to start configuration, it should tell you to press up twice, then press down twice, etc. It will watch for the button presses and then generate the database. I would guess that if you are getting just a black screen, then perhaps your overscan settings are cutting off the line. try just pressing the same gpio button several times and you should see it print out a couple lines stating that the control was mapped to the gpio button.
I'm not sure why you are getting the sqlite3 operational error in the database, every time that gpioneer starts, it should verify that the database/table exist and then create them if they don't. I'll look into it.
ok,
so what happens is, I press enter 'y'. then it comes up with the blue table of advanced configurations, and back to console as if nothing had happened
quick question, are you using a screen that is attached to the gpio?
No, my screen is a composite display
ok, you said that you get just a black screen when you run the commands
cd ~/gpioneer sudo python GPioneer.py -c
what if you do those and then press the same gpio button repeatedly, anything?
I'll give that a try and get back to you tommorow asap, really appreciate all the help, its either this or suffer with adafruits retrogame...
Maybe I can try and supply some video of what happens
yeah, if you can do that, it would be very helpful.
OK, file was very large so uploaded it to you tube, i did use putty but i assure you it is the exact same as to what happens on the pi. https://www.youtube.com/watch?v=CqNuY6GFGYI&feature=youtu.be its just really awkward to record the pi screen and the quality would be great.
This is very strange behavior. I can't figure out why it is exiting without printing so much as an error message. I think that I am going to write a debug mode into and see if we can at least figure out where it is dropping out.
yeah, i was thinking that the code could be altered as to just force me to enter setup mode
any update on the debug mode?
I haven't had a chance to get to it yet, I'm hoping to have some time Friday. If not, then it will be Monday because I'm taking my son camping this weekend.
No problem, enjoy!
ok, i set up a basic debug that will print out to your screen as the the program progresses. you just need to do the following commands to update.
cd ~ sudo rm -r gpioneer git clone https://github.com/mholgatem/gpioneer.git
Then run the program with
sudo python GPioneer.py -c --debug
*note the two hyphens in '--debug'
Ok, I ran the code only to be met with
python: can't open file 'GPioneer.py': [Errno 2] No such file or directory
I have been met with this error before, is it possible it is saving into the wrong location or something?
sorry, make sure that you cd back into the gpioneer folder
cd ~/gpioneer sudo python GPioneer.py -c --debug
I tried that, I run it and nothing happens, just like when I recorded it
ok, can you point me to the image that you used to create your sd card? Let me try downloading that and we can go from there.
here is the exact file i used for my retropie - I am using a pi 1, model b-
https://www.dropbox.com/s/x1zc2xuiwpv3dwb/retropie-v3.8.1-rpi1_zero.img.gz?dl=0
ok, I have one of those on hand. I'll check into it.
did you find anything of note?
I haven't had a chance to try it out yet, I should have some time today to mess with it.
fantastic, thanks again for all the help
sorry, I haven't forgotten about you. Things have just been really hectic lately. I'll let you know as soon as I have a chance to check it out.
No problem at all, no hurry
ok, it looks like they already had the python-evdev module installed in this version of retropie (but it's an old module).
so do this:
sudo pip install evdev --upgrade
That fixed it for me
Fantastic!
I can now configure gpioneer! BUT in retropie it doesnt seem to be accepting any inputs, other reboot, is there anything else i should be doing when finished the configuration do i need to set the controller do gpio somehow or what?
reboot your system, to make sure that everything has taken effect. In the command line, try pressing some of your buttons and check to see if they are outputting anything. It's been a while since I have used retropie, but I believe that there is an option to configure controllers. It should just register as a normal keyboard when you start pressing buttons.
no input seems to happen whatsoever ): , i can now access the gpioneer by going online as well now by typing in the IP
when you access the web interface, does it have listings? (something like "P1_UP KEY_UP 7")
ok, I'm guessing that gpioneer didn't start correctly then. I'm actually almost done with some big changes, but in the meantime you can do this.
sudo python ~/gpioneer/GPioneer.py &
This will run the app in the background, after running that command, try pressing P1_COIN (while still in the command line) and see if it outputs '1'
I just did a big update. You should do the following to update
sudo nano /etc/rc.local Delete the line that reads: python /home/pi/gpioneer/GPioneer.py &>/dev/null & exit and save, then: cd ~/gpioneer sudo bash remove.sh git reset --hard origin/master git pull sudo bash install.sh
That should get you completely up to date. Gpioneer will automatically start with the system and you can easily stop/start gpioneer and the web interface using these commands:
sudo systemctl stop gpioneer -or- sudo systemctl stop gpioneer-web
working! took a while but its working great now! using the online tool works great and i am blown away by the customize ability, will most definitely be using GPioneer in future projects! I cant thank you enough for all the help, if you ever need someone to help you test a new project or anything I am very happy to help. Keep up the good work, Thanks, Calum
Hi,
really exited to use this program however when I input all the commands and I get to "bash gpioneer/install.sh", when processing that there seems to be a few errors. After that it comes up with the "press Y/N to configure" as normal, I press Y but I am not prompted to input the controls as specified in the README. it comes up with the menu in blue text but upon entering any of the commands it just says no such file or directory. i would really like to re install it as a reconfigured some of the partitions and i believe it didn't install properly, what is the bets way to uninstall? or if I am simply using the program wrong any suggestions are very much appreciated, thanks.