Hi, I have an overlay workspace. Once I built it with ament build
and ran the corresponding node, it worked fine.
Then I removed the build and install directory and built it again with ament build --symlink-install
. Now whenever I run the same node there is a Tab and indentation error.
File "/home/aakash/ros2_overlay_ws/build/openadx_demo/openadx_demo/topics/sender.py", line 63
self.pub.publish(msg)
^
TabError: inconsistent use of tabs and spaces in indentation
This shouldnt be the case as I did not edit anything in the source code. What could be the problem ?
Originally posted by aks on ROS Answers with karma: 667 on 2018-07-03
Post score: 1
Original comments
Comment by marguedas on 2018-07-03:
The difference between ament build
and ament build --symlink-install
is the fact that in the first case the python file is copied to the install space, in the second case a symbolic link is created.
If the file in the source space uses only spaces the problem should not happen.
Comment by marguedas on 2018-07-03:
Can you confirm that if you delete the install folder and run ament build
again (without symlink-install) you can run the node successfully?
Comment by aks on 2018-07-04:
No, now i cannot run with ament build
as well. Strange. I already figured out that there were Tabs
in my code but I cannot understand how and why ?
Comment by marguedas on 2018-07-04:
it may be due to the editor you are using.
Many developers force their text editors to convert all tabs to space automatically to avoid this type of issue.
Can this question be marked as closed as the problem is not due to ament
or the use of the --symlink-install
flag?