Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Python (http://www.chiefdelphi.com/forums/forumdisplay.php?f=187)
-   -   error installing robotpy (http://www.chiefdelphi.com/forums/showthread.php?t=153356)

acastagna 10-01-2017 00:07

error installing robotpy
 
My team has just started exploring the use of python and we are having some trouble installing robotpy on our PC (windows 10). We have installed python3.6 and pyfrc, and imaged the roborio without any issues. We downloaded the zipped robotpy file from GitHub, extracted the file, and used py -3 installer.py install-robotpy as specified in the robotpy documentation. That gives us the following error. An online search suggests an encoding issue. Does anyone have any suggestions on where to go from here?

Code:

C:\Users\falcons1493\robotpy\robotpy-2017.0.0>  py -3 installer.py install-robotpy
Traceback (most recent call last):
  File "installer.py", line 1010, in <module>
    retval = main()
  File "installer.py", line 991, in main
    retval = options.cmdobj(options)
  File "installer.py", line 751, in install_robotpy
    self.install_opkg(opkg_options)
  File "installer.py", line 798, in install_opkg
    opkg = self._get_opkg()
  File "installer.py", line 676, in _get_opkg
    opkg.add_feed("http://download.ni.com/ni-linux-rt/feeds/2016/arm/ipk/cortexa9-vfpv3")
  File "installer.py", line 93, in add_feed
    self.load_package_db(feed)
  File "installer.py", line 107, in load_package_db
    for line in fp.readlines():
  File "C:\Program Files\Python36\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 7516: character maps to <undefined>


TimTheGreat 10-01-2017 00:38

Re: error installing robotpy
 
An update was just released for pyfrc. Update it. You may run into another error about python36. I believe an update for that is coming out tonight.

vScourge 10-01-2017 07:06

Re: error installing robotpy
 
https://github.com/robotpy/robotpy-wpilib/issues/246

virtuald 10-01-2017 10:28

Re: error installing robotpy
 
The bug is fixed in RobotPy 2017.0.1, sorry for the inconvenience.

acastagna 10-01-2017 10:35

Re: error installing robotpy
 
Thank you!
I'll trying update it tonight.

acastagna 11-01-2017 00:03

Re: error installing robotpy
 
I can now run python code on the roborio using the command line to deploy.

If I use eclipse as my IDE can I deploy directly from there? When I try a "Run As/Python Deploy" the following error occurs:

Unexpected error
Illegal character in path at index 16: file:/C:/Program Files/eclipse-java-neon-1a-win32-x86_64/eclipse/configuration/org.eclipse.osgi/494/0/.cp/resources/py/preexec.py

Am I missing something in the setup for eclipse?

virtuald 11-01-2017 00:18

Re: error installing robotpy
 
Quote:

Originally Posted by acastagna (Post 1629069)
I can now run python code on the roborio using the command line to deploy.

If I use eclipse as my IDE can I deploy directly from there? When I try a "Run As/Python Deploy" the following error occurs:

Unexpected error
Illegal character in path at index 16: file:/C:/Program Files/eclipse-java-neon-1a-win32-x86_64/eclipse/configuration/org.eclipse.osgi/494/0/.cp/resources/py/preexec.py

Am I missing something in the setup for eclipse?

Are you using the RobotPy plugins for Eclipse? I should probably unpublish those... nobody really used them as far as I could tell, so I stopped updating them.

But yes, you can use Eclipse + Pydev + RobotPy. There's some documentation about using RobotPy with Eclipse + Pydev: http://robotpy.readthedocs.io/en/sta....html?#eclipse . I've been meaning to update the documentation, but been busy.

acastagna 12-01-2017 06:03

Re: error installing robotpy
 
Thank you - I was using the plug-ins and had missed the part in the documentation about the adding the deploy argument in the run configuration.

I guess I shouldn't be using the plug-ins if they are not updated. I had also installed pyfrc and robotpy on two other laptops which are running Window 8, and I found that I don't get the illegal character error on those machines.

What do teams using python use when programming - Eclipse, Idle, something else?

vScourge 12-01-2017 09:06

Re: error installing robotpy
 
We use Wing IDE. I'm a big fan of it, use it on my day job. It also has a nice scripting API and we were able to make a simple command to deploy code to the RoboRio, copy GRIP config files over SFTP, etc.


All times are GMT -5. The time now is 14:50.

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