Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I have no idea
#2
you are in infinite loop because you never increment x.
Also, check https://python-forum.io/Thread-Basic-Nev...n-sequence You use while, but in fact it's the same problem. Learn how to iterate over elements of the list, tuple, etc., without using index
there are plenty of other things that are wrong or can/should be done differently, e.g.
'http://pipeline.wyo.gov/whatups/whatupcomps.cfm?nautonum={}' + str(apis[x][3:10]) is probably 'http://pipeline.wyo.gov/whatups/whatupcomps.cfm?nautonum=' + apis[x][3:10]
or 'http://pipeline.wyo.gov/whatups/whatupcomps.cfm?nautonum={}'.format(apis[x][3:10])
the elements of the list are str, so no need to convert them everywhere in the code
also, using regex to parse html is really bad idea
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
I have no idea - by tjnichols - Oct-05-2018, 05:01 PM
RE: I have no idea - by buran - Oct-05-2018, 07:07 PM
RE: I have no idea - by tjnichols - Oct-07-2018, 04:00 PM
RE: I have no idea - by buran - Oct-07-2018, 04:05 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020