First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked Jul 21 '12

waltterval gravatar image

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

click to hide/show revision 2
No.2 Revision

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