Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Problem whit ZipFile

Hi, I'm reading the post "All you need to analyse the electricity market pt 2" (http://www.whit.com.au/blog/2012/07/all-you-need-to-analyse-the-electricity-market-pt-2/), when I try to run the script "extractzip.py", I get this error

Traceback (most recent call last):

File "H:\PortableAppscom\Documents\PSSE group\PSSPY\extractzip.py", line 10, in <module>

opened_zipfile = ZipFile(zippedfile)

File "C:\Python27\lib\zipfile.py", line 684, in init

self._GetContents()

File "C:\Python27\lib\zipfile.py", line 710, in _GetContents

self._RealGetContents()

File "C:\Python27\lib\zipfile.py", line 720, in _RealGetContents

endrec = _EndRecData(fp)

File "C:\Python27\lib\zipfile.py", line 197, in _EndRecData

fpin.seek(0, 2)

AttributeError: addinfourl instance has no attribute 'seek'

I thik the problem is with "ZipFile(zippedfile)", maybe python has problem whit the filename in variable zippedfile.

I will appreciate your help.

Thanks in advance for you replies. Waltter Valdez

Problem whit ZipFile

Hi, I'm reading the post "All you need to analyse the electricity market pt 2" (http://www.whit.com.au/blog/2012/07/all-you-need-to-analyse-the-electricity-market-pt-2/), when I try to run the script "extractzip.py", I get this error

Traceback (most recent call last):

File "H:\PortableAppscom\Documents\PSSE group\PSSPY\extractzip.py", line 10, in <module>

opened_zipfile = ZipFile(zippedfile)

File "C:\Python27\lib\zipfile.py", line 684, in init

self._GetContents()

File "C:\Python27\lib\zipfile.py", line 710, in _GetContents

self._RealGetContents()

File "C:\Python27\lib\zipfile.py", line 720, in _RealGetContents

endrec = _EndRecData(fp)

File "C:\Python27\lib\zipfile.py", line 197, in _EndRecData

fpin.seek(0, 2)

AttributeError: addinfourl instance has no attribute 'seek'

I thik the problem is with "ZipFile(zippedfile)", maybe python has problem whit the filename in variable zippedfile.

I will appreciate your help.

Thanks in advance for you replies. Waltter Valdez