Hello guest, if you read this it means you are not registered. Click here to register in a few simple steps, you will enjoy all features of our Forum.
Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"EOL While Scanning String Literal"
#21
Read the error message!
Quote:FileNotFoundError: [Errno 2] No such file or directory: 'text\\apis.txt'
is there a text directory directly below the source, and did you download the file attached to my post and put it there as requested?

Do so and try again.
Quote
#22
Ok - I've read the error. The problem is this 'text\\apis.txt'. It shows \\. I am unable to add a \ to the file nor am I able to create a file without a name. So I am stuck.

I’ve copied and pasted your text file into a text document and pasted it into the appropriate place. There is no option to simply save it (it could also be operator error). For that matter this is all operator error I’m sure. I’ve tried clicking it, right clicking it – still the same options.

I thought this was obvious but maybe not so much. I did try placing the api.txt file in the text folder and ran it. I still got the error.
Quote
#23
the file name should be 'apis.txt' and should be in the text folder.

Quote:I did try placing the api.txt file in the text folder and ran it. I still got the error.
check spelling, 'apis.txt' not 'api.txt'
Look at line 97
Quote
#24
Ok - Lars60+ - I feel like an idiot! Sometimes I can't see the forest for the trees! For this, I sincerely apologize!

I ran the code and it worked great for all of the apis for "Fetching main page for entry: "api" at this point it stops. The xx_completions_xx file has the files that were obtained with the above code as well as the summary reports. I just don't get the completion reports.

I'm sorry this has taken so long - I've tried several things. I thought the problem might be on my end. The weird thing is most of your code matches what you had before.

Let me know what you think.

Thanks!

T
Quote
#25
your directory structure should look like:
Output:
parent/ src/ OilWells.py (or whatever you named the script) logpdfs/ all pdf files text/ apis.txt all summary files xx_completions_xx/ all completion html files (double clicking on any brings up browser with report
This has to be what you have as well, if the program ran without errors
You should dig into the code and understand what is happening.
If you don't under stand part of it, ask.
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  SyntaxError: EOL while scanning string literal on with open() statement Regulus 3 272 Feb-23-2018, 06:40 PM
Last Post: nilamo
  Problem with "invalid literal for int() with base 10: '' jirkaj4 4 266 Jan-23-2018, 06:55 PM
Last Post: jirkaj4
  ValueError: invalid literal for int() with base 10: '[2,4,7,8,19]' rajeev1729 3 2,627 Sep-15-2017, 05:51 PM
Last Post: nilamo
  how to convert string soup to raw string ? Fran_3 8 1,496 Aug-18-2017, 09:25 AM
Last Post: wavic
  SyntaxError: EOL while scanning string literal elliep 13 2,328 Jul-27-2017, 08:46 PM
Last Post: elliep
  why does integer input give error invalid literal for int() PyPhanman 2 602 Apr-27-2017, 05:32 AM
Last Post: ndc85430
  ValueError: invalid literal for int() with base 10: '' DennisT 8 3,735 Oct-12-2016, 03:20 PM
Last Post: DennisT

Forum Jump:


Users browsing this thread: 1 Guest(s)