urgent help

Dave Angel davea at davea.name
Fri Feb 20 19:45:16 EST 2015


On 02/20/2015 07:20 PM, ms.isma222 at gmail.com wrote:
> On Saturday, February 21, 2015 at 8:17:06 AM UTC+8, ms.is... at gmail.com wrote:
>> On Saturday, February 21, 2015 at 8:14:43 AM UTC+8, ms.is... at gmail.com wrote:
>>> On Friday, February 20, 2015 at 4:41:57 PM UTC+8, Mark Lawrence wrote:
>>>> On 20/02/2015 08:24, ismahameed at gcuf.edu.pk wrote:
>>>>
>>>> Would you please give your requests a meaningful subject.
>>>>
>>>>> sir these errors whats mean by it
>>>>> warning (from warnings module):
>>>>>     File "D:\PHD 1st semester\scripts\NetDoctor\getNetDoctor.py", line 18
>>>>>       br.set_handle_gzip(True)
>>>>> UserWarning: gzip transfer encoding is experimental!
>>>>
>>>> See
>>>> http://stackoverflow.com/questions/21415450/what-does-mechanize-br-set-handle-gzip-do
>>>>
>>>>>
>>>>> Traceback (most recent call last):
>>>>>     File "D:\PHD 1st semester\scripts\NetDoctor\getNetDoctor.py", line 106, in <module>
>>>>>       getLinksComlicated()
>>>>>     File "D:\PHD 1st semester\scripts\NetDoctor\getNetDoctor.py", line 80, in getLinksComlicated
>>>>>       for file in os.listdir(dir)[1:]:
>>>>> WindowsError: [Error 3] The system cannot find the path specified: 'complicated/*.*'
>>>>>
>>>>
>>>> Either the code needs changing so it does a wildcard search or you need
>>>> to pass in 'complicated' alone.  Seeing those three magic letters P H D
>>>> I'll leave you to research the former :)
>>>>
>>>> --
>>>> My fellow Pythonistas, ask not what our language can do for you, ask
>>>> what you can do for our language.
>>>>
>>>> Mark Lawrence
>>>
>>>
>>> sir what mean by the following errors:
>>> Traceback (most recent call last):
>>>    File "D:\My Documents\Desktop\scripts\WebMD\getWebMDExperts.py", line 143, in <module>
>>>      links = getExpertInfoLinks()
>>>    File "D:\My Documents\Desktop\scripts\WebMD\getWebMDExperts.py", line 119, in getExpertInfoLinks
>>>      fid = open("health-experts.htm","rb")
>>> IOError: [Errno 2] No such file or directory: 'health-experts.htm'
>>
>>   File "D:\My Documents\Desktop\scripts\BeOk\getBeOKExperts.py", line 149, in <module>
>>      getForums()
>>    File "D:\My Documents\Desktop\scripts\BeOk\getBeOKExperts.py", line 143, in getForums
>>      soup = BeautifulSoup(open(file,"r").read())
>>    File "C:\Python27\lib\codecs.py", line 878, in open
>>      file = __builtin__.open(filename, mode, buffering)
>> IOError: [Errno 2] No such file or directory: 'links.htm
>
> Traceback (most recent call last):
>    File "D:\My Documents\Desktop\scripts\NetDoctor\getNetDoctor.py", line 106, in <module>
>      getLinksComlicated()
>    File "D:\My Documents\Desktop\scripts\NetDoctor\getNetDoctor.py", line 80, in getLinksComlicated
>      for file in os.listdir(dir)[1:]:
> WindowsError: [Error 3] The system cannot find the path specified: 'complicated/*.*'
>

Those errors all mean the same thing.  You've got a bug in your code.

But since you don't show your code, all we can do is guess.  All of 
those refer to missing files.  The first two are missing when you try to 
open them, so we can be pretty sure they're not in the current directory.

In the third case, you're calling listdir() with a directory name with 
asterisks in it.  And those aren't legal in Windows.  Fix the directory 
name, perhaps to  "Z:/Your_documents/someplace/else/complicated/"  Of 
course, you probably don't ahve that directory either, but it's more 
likely than the one you specified.


-- 
DaveA



More information about the Python-list mailing list