Go to Post I keep on accidently seeing (and pronouncing) it as Chef Deli. - JJG13 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 16-01-2015, 13:33
team-4480's Avatar
team-4480 team-4480 is offline
Debug? What's that?
FRC #4480
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Minnesooota
Posts: 222
team-4480 will become famous soon enoughteam-4480 will become famous soon enough
RobotPy D eploy Error? What are we missing?

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.
Attached Thumbnails
Click image for larger version

Name:	python_probelm.png
Views:	47
Size:	20.4 KB
ID:	17861  
  #2   Spotlight this post!  
Unread 16-01-2015, 14:04
Peter Johnson Peter Johnson is offline
WPILib Developer
FRC #0294 (Beach Cities Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Redondo Beach, CA
Posts: 255
Peter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud of
Re: RobotPy D eploy Error? What are we missing?

Quote:
Originally Posted by team-4480 View Post
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.
__________________
Author of cscore - WPILib CameraServer for 2017+
Author of ntcore - WPILib NetworkTables for 2016+
Creator of RobotPy - Python for FRC

2010 FRC World Champions (294, 67, 177)
2007 FTC World Champions (30, 74, 23)
2001 FRC National Champions (71, 294, 125, 365, 279)
  #3   Spotlight this post!  
Unread 16-01-2015, 14:24
team-4480's Avatar
team-4480 team-4480 is offline
Debug? What's that?
FRC #4480
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Minnesooota
Posts: 222
team-4480 will become famous soon enoughteam-4480 will become famous soon enough
Re: RobotPy D eploy Error? What are we missing?

Quote:
Originally Posted by Peter Johnson View Post
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.
Attached Thumbnails
Click image for larger version

Name:	new_problem.png
Views:	32
Size:	17.8 KB
ID:	17863  
  #4   Spotlight this post!  
Unread 16-01-2015, 14:38
Peter Johnson Peter Johnson is offline
WPILib Developer
FRC #0294 (Beach Cities Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Redondo Beach, CA
Posts: 255
Peter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud of
Re: RobotPy D eploy Error? What are we missing?

Quote:
Originally Posted by team-4480 View Post
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.
__________________
Author of cscore - WPILib CameraServer for 2017+
Author of ntcore - WPILib NetworkTables for 2016+
Creator of RobotPy - Python for FRC

2010 FRC World Champions (294, 67, 177)
2007 FTC World Champions (30, 74, 23)
2001 FRC National Champions (71, 294, 125, 365, 279)
  #5   Spotlight this post!  
Unread 16-01-2015, 14:52
team-4480's Avatar
team-4480 team-4480 is offline
Debug? What's that?
FRC #4480
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Minnesooota
Posts: 222
team-4480 will become famous soon enoughteam-4480 will become famous soon enough
Re: RobotPy D eploy Error? What are we missing?

Quote:
Originally Posted by Peter Johnson View Post
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.
Attached Thumbnails
Click image for larger version

Name:	next_problem.png
Views:	22
Size:	9.0 KB
ID:	17864  
  #6   Spotlight this post!  
Unread 16-01-2015, 15:02
Peter Johnson Peter Johnson is offline
WPILib Developer
FRC #0294 (Beach Cities Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Redondo Beach, CA
Posts: 255
Peter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud of
Re: RobotPy D eploy Error? What are we missing?

Quote:
Originally Posted by team-4480 View Post
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.
__________________
Author of cscore - WPILib CameraServer for 2017+
Author of ntcore - WPILib NetworkTables for 2016+
Creator of RobotPy - Python for FRC

2010 FRC World Champions (294, 67, 177)
2007 FTC World Champions (30, 74, 23)
2001 FRC National Champions (71, 294, 125, 365, 279)
  #7   Spotlight this post!  
Unread 16-01-2015, 15:21
team-4480's Avatar
team-4480 team-4480 is offline
Debug? What's that?
FRC #4480
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Minnesooota
Posts: 222
team-4480 will become famous soon enoughteam-4480 will become famous soon enough
Re: RobotPy D eploy Error? What are we missing?

Quote:
Originally Posted by Peter Johnson View Post
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!
Attached Thumbnails
Click image for larger version

Name:	another-problem.png
Views:	14
Size:	16.4 KB
ID:	17865  
  #8   Spotlight this post!  
Unread 16-01-2015, 15:41
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,058
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: RobotPy D eploy Error? What are we missing?

Quote:
Originally Posted by team-4480 View Post
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
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
  #9   Spotlight this post!  
Unread 16-01-2015, 15:56
team-4480's Avatar
team-4480 team-4480 is offline
Debug? What's that?
FRC #4480
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Minnesooota
Posts: 222
team-4480 will become famous soon enoughteam-4480 will become famous soon enough
Re: RobotPy D eploy Error? What are we missing?

Quote:
Originally Posted by virtuald View Post
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!!
Attached Thumbnails
Click image for larger version

Name:	problems.png
Views:	12
Size:	22.5 KB
ID:	17866  
  #10   Spotlight this post!  
Unread 16-01-2015, 16:00
Peter Johnson Peter Johnson is offline
WPILib Developer
FRC #0294 (Beach Cities Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Redondo Beach, CA
Posts: 255
Peter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud of
Re: RobotPy D eploy Error? What are we missing?

Quote:
Originally Posted by team-4480 View Post
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".
__________________
Author of cscore - WPILib CameraServer for 2017+
Author of ntcore - WPILib NetworkTables for 2016+
Creator of RobotPy - Python for FRC

2010 FRC World Champions (294, 67, 177)
2007 FTC World Champions (30, 74, 23)
2001 FRC National Champions (71, 294, 125, 365, 279)
  #11   Spotlight this post!  
Unread 16-01-2015, 16:36
team-4480's Avatar
team-4480 team-4480 is offline
Debug? What's that?
FRC #4480
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Minnesooota
Posts: 222
team-4480 will become famous soon enoughteam-4480 will become famous soon enough
Re: RobotPy D eploy Error? What are we missing?

Quote:
Originally Posted by Peter Johnson View Post
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!!
  #12   Spotlight this post!  
Unread 16-01-2015, 17:14
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,058
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
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.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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