Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   RobotPy D eploy Error? What are we missing? (http://www.chiefdelphi.com/forums/showthread.php?t=132991)

team-4480 16-01-2015 13:33

RobotPy D eploy Error? What are we missing?
 
1 Attachment(s)
Hi! We ran into a code deploy problem we are not sure how to fix them(first year using python). I linked the error message below. I entered in the command "py robotcode.py deploy" which brought the error message. I have robotpy installed on the roboRIO. Any help will be greatly appreciated.

Peter Johnson 16-01-2015 14:04

Re: RobotPy D eploy Error? What are we missing?
 
Quote:

Originally Posted by team-4480 (Post 1429239)
Hi! We ran into a code deploy problem we are not sure how to fix them(first year using python). I linked the error message below. I entered in the command "py robotcode.py deploy" which brought the error message. I have robotpy installed on the roboRIO. Any help will be greatly appreciated.

You should put your robot code into its own directory. It looks like the directory where your robotcode.py is has other files in it (e.g. a pyfrc directory), so it's getting confused between the installed pyfrc (in C:\Python34) and the one in the local directory.

team-4480 16-01-2015 14:24

Re: RobotPy D eploy Error? What are we missing?
 
1 Attachment(s)
Quote:

Originally Posted by Peter Johnson (Post 1429258)
You should put your robot code into its own directory. It looks like the directory where your robotcode.py is has other files in it (e.g. a pyfrc directory), so it's getting confused between the installed pyfrc (in C:\Python34) and the one in the local directory.

Ok so I got a new problem when trying to upload. With your help I was able to get farther. See image for details.

Peter Johnson 16-01-2015 14:38

Re: RobotPy D eploy Error? What are we missing?
 
Quote:

Originally Posted by team-4480 (Post 1429276)
Ok so I got a new problem when trying to upload. With your help I was able to get farther. See image for details.

That looks like a successful upload (the last message is just saying there wasn't previous robot code running). Note you should be uploading as "lvuser" rather than admin. If the robot code still isn't running, either check netconsole or use putty to log in as lvuser, run "sh robotCommand" (if the first time prints out an error like "socket in use" or "FRC pid XXX did not die within 110 ms, aborting", wait a few seconds and try again), and see if that prints out any errors.

team-4480 16-01-2015 14:52

Re: RobotPy D eploy Error? What are we missing?
 
1 Attachment(s)
Quote:

Originally Posted by Peter Johnson (Post 1429289)
That looks like a successful upload (the last message is just saying there wasn't previous robot code running). Note you should be uploading as "lvuser" rather than admin. If the robot code still isn't running, either check netconsole or use putty to log in as lvuser, run "sh robotCommand" (if the first time prints out an error like "socket in use" or "FRC pid XXX did not die within 110 ms, aborting", wait a few seconds and try again), and see if that prints out any errors.

Thanks for the responses and I am very happy to see the actual developer of robotpy here. I got a new error when I did what you said. See picture again.

Peter Johnson 16-01-2015 15:02

Re: RobotPy D eploy Error? What are we missing?
 
Quote:

Originally Posted by team-4480 (Post 1429298)
Thanks for the responses and I am very happy to see the actual developer of robotpy here. I got a new error when I did what you said. See picture again.

Is your robot script named robot.py? Are there any files in the py directory? I'm not the author of the pyfrc parts, virtuald is (he frequents Chief Delphi as well), but it looks like pyfrc's deploy feature may always make robotCommand call robot.py, rather than using the actual name of the script used when deploying. As a workaround, try renaming your script to robot.py if it isn't already.

If there are no files in the py directory, it could also be permissions related since you were uploading as admin previously--if that's the case, try logging in as admin, removing /home/lvuser/py, and then retrying your upload as lvuser.

team-4480 16-01-2015 15:21

Re: RobotPy D eploy Error? What are we missing?
 
1 Attachment(s)
Quote:

Originally Posted by Peter Johnson (Post 1429307)
Is your robot script named robot.py? Are there any files in the py directory? I'm not the author of the pyfrc parts, virtuald is (he frequents Chief Delphi as well), but it looks like pyfrc's deploy feature may always make robotCommand call robot.py, rather than using the actual name of the script used when deploying. As a workaround, try renaming your script to robot.py if it isn't already.

If there are no files in the py directory, it could also be permissions related since you were uploading as admin previously--if that's the case, try logging in as admin, removing /home/lvuser/py, and then retrying your upload as lvuser.

Ok so I deleted the directory and I tried to upload the code again(see pic). I think the problem is that the command line saved my username and password for admin. How do I make it so I log in as lvuser after it already saved the info in cache? Thanks again!

virtuald 16-01-2015 15:41

Re: RobotPy D eploy Error? What are we missing?
 
Quote:

Originally Posted by team-4480 (Post 1429316)
Ok so I deleted the directory and I tried to upload the code again(see pic). I think the problem is that the command line saved my username and password for admin. How do I make it so I log in as lvuser after it already saved the info in cache? Thanks again!

Remove .deploy_cfg and it will ask again (or just edit it). Also, upgrade to pyfrc 2015.1.0, as it no longer asks you for a username, and has other fixes.

Code:

c:\python34\scripts\pip.exe install -U pyfrc

team-4480 16-01-2015 15:56

Re: RobotPy D eploy Error? What are we missing?
 
1 Attachment(s)
Quote:

Originally Posted by virtuald (Post 1429324)
Remove .deploy_cfg and it will ask again (or just edit it). Also, upgrade to pyfrc 2015.1.0, as it no longer asks you for a username, and has other fixes.

Code:

c:\python34\scripts\pip.exe install -U pyfrc

Ok so I installed the latest Pyfrc and now, for some odd reason, I get a permission denied error. See picture for details. Thanks again for all the help!!

Peter Johnson 16-01-2015 16:00

Re: RobotPy D eploy Error? What are we missing?
 
Quote:

Originally Posted by team-4480 (Post 1429329)
Ok so I installed the latest Pyfrc and now, for some odd reason, I get a permission denied error. See picture for details. Thanks again for all the help!!

Use putty to log in as admin, then run "rm /home/lvuser/robotCommand". You may also need to do "rm -r /home/lvuser/py".

team-4480 16-01-2015 16:36

Re: RobotPy D eploy Error? What are we missing?
 
Quote:

Originally Posted by Peter Johnson (Post 1429331)
Use putty to log in as admin, then run "rm /home/lvuser/robotCommand". You may also need to do "rm -r /home/lvuser/py".

I am super happy and thankful to say that the deploy worked! It showed up in the FRC driver station and everything! Thank you both so much for taking the time to help us with robotpy and pyfrc!!

virtuald 16-01-2015 17:14

Re: RobotPy D eploy Error? What are we missing?
 
Great to hear. Sorry about the problems... I expect that you shouldn't run into any more deploy issues now that you're using the newest version of pyfrc.


All times are GMT -5. The time now is 02:39.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi