I am getting an error running a python script "cannot find parser.pyx: file not found" and the path is the current working directory + "pandas_libs\parsers.pyx". I cannot find why VsCode is referencing the wkdr instead of the application path which is specified correctly.
Asked
Active
Viewed 3,277 times
8
-
How are you launching the script? – Brett Cannon Dec 12 '18 at 00:00
-
@BrettCannon Running the Debugger by pressing F5 – Mike0T7 Dec 19 '18 at 00:32
-
The extension always uses the working directory unless you override it in your `launch.json` file. – Brett Cannon Dec 19 '18 at 17:57
-
@Brett Cannon could you provide a sample? I'm getting the same issue. – Mark Hollas Mar 22 '19 at 11:47
-
1@MarkHollas https://code.visualstudio.com/docs/python/debugging#_cwd – Brett Cannon Mar 22 '19 at 17:34
-
Any solution to this? Same problem. – tulanejosh May 09 '19 at 19:47
-
I experienced the same issue when debugging when I was trying to read a csv-file that doesn't exist. Maybe that helps... – Andi Jul 24 '19 at 09:03
-
Use the full path to the file – gary69 Jan 25 '20 at 03:06
1 Answers
0
I shows my solution on the same above problem. First, I doubted conflict the "parsers.pyx" between "current working directory + pandas_libs\parsers.pyx" made by VScode and pandas library installed.
Solution: I fixed my .csv file by table editor of PyCharm whicl tell me my problem.
Process: My code was run on PyCharm. PyCharm telled me a error on csv corruption. such as "pandas.errors.ParserError: Error tokenizing data. C error: Expected 98 fields in line 230, saw 99" @ Python Pandas Error tokenizing data
So I removed column 99 from my cvs file.
After that, I could read my csv file correctly on VSCode.

user2058374
- 69
- 1
- 1
- 11