I keep getting this error when trying to launch my packages. I have made sure all .py files have the correct permissions. The first line of my code is #! /usr/bin/env python

asked 27 Feb, 22:40

usaroboboat's gravatar image

usaroboboat
0
accept rate: 0%


That's a common issue that users encounter. Probably you have both multiple python versions and the one (in your case: /usr/bin/env: ‘python’) has not been added to your environment.

Add the following in .bashrc export PYTHONPATH=$PYTHONPATH:/opt/ros/kinetic/lib/python2.7/dist-packages

Or if you use conda: export PYTHONPATH=$PYTHONPATH:/home/USER/miniconda3/bin:$PATH

Hope that works.

permanent link

answered 28 Feb, 14:34

alanyangttu's gravatar image

alanyangttu
01
accept rate: 0%

edited 28 Feb, 14:36

The problem was caused by the end of line format code. if you use LF+CR you get the error. In the file editor use only LF to fix it.

permanent link

answered 01 Mar, 18:31

joseecm%40gmail.com's gravatar image

joseecm@gmai...
192
accept rate: 20%

edited 01 Mar, 18:49

I'm experiencing the same error as OP. I'm not sure how to execute the solutions above, please help!

permanent link

answered 05 Mar, 06:52

maxxy.tjr's gravatar image

maxxy.tjr
01
accept rate: 0%

If you are using the code editor that appears on the web page of the Ignite Academy courses then select the .py file to open it in the editor. Click on the file name on the top and then you can see at the bottom a blue line that shows info like: "Ln 9, Col 7 LF Spaces: 4....". When click on LF you can choose two options, LF or CRLF. Select LF to fix the problem.

Best Regards.

permanent link

answered 05 Mar, 16:10

joseecm%40gmail.com's gravatar image

joseecm@gmai...
192
accept rate: 20%

edited 06 Mar, 09:40

Thanks, it worked!

permanent link

answered 07 Mar, 04:07

maxxy.tjr's gravatar image

maxxy.tjr
01
accept rate: 0%

Just a picture to say as much as @joseecmgmailcom has said: Chage CRLF to LF in Robot Ignite Academy IDE

permanent link

answered 20 Mar, 08:38

bayodesegun%40bayodesegun.com's gravatar image

bayodesegun@...
602
accept rate: 41%

THanks guys! LF fixed it :)

permanent link

answered 30 Mar, 11:12

jasonalexanderchan%40gmail.com's gravatar image

jasonalexand...
0
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×28
×9
×9
×2

question asked: 27 Feb, 22:40

question was seen: 313 times

last updated: 30 Mar, 11:12

powered by OSQA