Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 1225

Python • Re: script won't execute but permissions look OK

$
0
0
Ha! Talking to myself.

It seems that python3 takes exception to the directory name 'FilamentLoadCell' and won't execute files within or below it. If I rename that directory to something else, it works. I've copied 'foobar' into 'FilamentLoadCell:

Code:

ian@Delta:~ $ cd /opt/dsf/plugins/FilamentLoadCell/ian@Delta:/opt/dsf/plugins/FilamentLoadCell $ ./foobar/usr/bin/python3: can't open file '/opt/dsf/plugins/FilamentLoadCell/./foobar': [Errno 13] Permission deniedian@Delta:/opt/dsf/plugins/FilamentLoadCell $ cd ..ian@Delta:/opt/dsf/plugins $ sudo mv FilamentLoadCell kapowian@Delta:/opt/dsf/plugins $ cd kapowian@Delta:/opt/dsf/plugins/kapow $ ./foobarhello
So if the directory the file is in is called 'FilamentLoadCell' it won't run, but if the directory is renamed to 'kapow' it does. If I re-rename 'kapow' back to 'FilamentLoadCell' the script stops working again.
Even if I rename 'FilamentLoadCell' to 'FilamentLoadCel' or 'FilamentLoadCelll' it works.

What is going on here?

Statistics: Posted by achrn — Thu Apr 25, 2024 6:37 pm



Viewing all articles
Browse latest Browse all 1225

Trending Articles