Closed Poiuy7312 closed 10 months ago
We should rely on Path
objects to concatenate paths. This automatically changes between different OSs. Windows uses \path\to\file
while linux uses /path/to/file
.
Pathlib: https://docs.python.org/3/library/pathlib.html
Hi, I agree with @simojo that this is the general-purpose solution. However, there is one additional challenge faced with this issue. This part of the program needs to run a different executable inside of a virtual environment depending on whether this program is being run on Windows or MacOS/Linux. I've gone through this issue in detail with @Poiuy7312. Can you summarize what we discussed @Poiuy7312 and then say how you are going to push this forward? Thanks everyone for your contributions to this issue and to its ultimate resolution.
chasten datasette-serve C:\Users\Preston\CMPSC-203\ChastenProject\chasten\subject-data\chasten-flattened-csvs-sqlite-db-all-programs-20230905151458-42dbbaac257447cfa602106ce0d5a93d\chasten.db --port 8001
I got this error when running the above command and found that its searching for the executable in a bin file when they are stored in a file called Scripts on Windows. I fixed this by changing the following code.
To
and it ran on windows
This is a solution for Windows however it may mean we may need to run different code depending what OS people are using since executables are stored differently on different OS