Skip to content
This repository has been archived by the owner on Aug 12, 2021. It is now read-only.

Incorrect directory separator for Unix causes FileNotFoundError #13

Open
JoshuaArking opened this issue Sep 11, 2019 · 1 comment
Open

Comments

@JoshuaArking
Copy link

I am running this on Linux Mint 19.2 and when executed, it exits with FileNotFoundError:

Traceback (most recent call last): File "/home/mint/PycharmProjects/ELEVATE/LBORO/Vehicle Model/main.py", line 52, in <module> datafile = DataIoClass(filename+".tsv") File "/home/mint/PycharmProjects/ELEVATE/LBORO/Vehicle Model/DataInputClass.py", line 91, in __init__ self._file_in = open(filename,'rt') FileNotFoundError: [Errno 2] No such file or directory: 'DriveCycles\\WLTP_kph.tsv'

Changing directory separator from \ to / in filename on line 28 of Main.py fixes the issue and should still work on windows systems.

@howroyd
Copy link
Owner

howroyd commented Sep 12, 2019

Good find, thank you! I was running on Windoze.
Feel free to do a pull request and I'll happily accept.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants