-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Full Path to .py script fails #38
Comments
It'a a bug, absolute paths are not supported because of the handling of the Quick workaround: set |
That works, sorry... didn't see that option! |
It's still a workaround, python-shell should support absolute paths. Reopening so I can fix this in a future release. |
Just to know, is it fixed yet? Thanks |
Heres a workaroun for OSX. I recommmend using
|
Just to know, is it fixed yet? Thanks. (says it is closed; issue is not fixed for me) |
? The issue is still open - for now just use the workaround |
the workaround is not always working: pyshell = new pyShell('main.py',{scriptPath: path.join(__dirname, '..', 'src', 'GNSS_Positioning')} , options) also the scriptpath inside the options is resulting in the above described errors. please support full paths |
This comment has been minimized.
This comment has been minimized.
@KarthikSamaganam4 this is unrelated to this issue - I've opened a new issue for you. See #151 |
PythonShell should support both relative and absolute paths now. For example, the runString function works by passing an absolute path to the a file in the temp directory over to pythonshell. The function is unit tested in both windows and mac so it will work no matter the platform. @Trevirirus, can you double check if it has been fixed in the latest version (1.0.4) of python-shell please? You should be able to pass the path into pythonshell without having to specify any options. @extrabacon, I fixed it in 4ba8b5e by removing the ./ which was causing an error with absolute paths on mac. Was there any reason ./ was in there in the first place? Hopefully I didn't break some weird edge case not covered in the unit tests. |
I'm using the following to call my python script:
If I use the full path to the script it fails with the error below:
If I use the following path to the script it all works ok:
../python/SenseHat.py
and so does:
../../../../../home/pi/Development/Sensor/python/SenseHat.py
The text was updated successfully, but these errors were encountered: