ding (11) [Avatar] Offline
#1
please help, thanks! detailed message below.
-------------------------

D: hirdPartyJs>python freeze.py
Traceback (most recent call last):
File "freeze.py", line 20, in <module>
freezer.freeze()
File "Csmilieython27libsite-packagesfrozen_flask-0.8-py2.7.eggflask_frozen\__
init__.py", line 134, in freeze
for url, endpoint in self._generate_all_urls():
File "Csmilieython27libsite-packagesfrozen_flask-0.8-py2.7.eggflask_frozen\__
init__.py", line 184, in _generate_all_urls
for generated in generator():
File "freeze.py", line 16, in example_url_generator
out.append(('example', {'chapter':parts[2], 'name':parts[3], 'file':f}))
IndexError: list index out of range
benvinegar (68) [Avatar] Offline
#2
Re: python freeze.py IndexError: list index out of range
Hey ding – what version of the source code are you using?
ding (11) [Avatar] Offline
#3
Re: python freeze.py IndexError: list index out of range
Hi Ben,

I have the latest version January 24, 2012. My machine is Windows 7.

My installed folder structure is:

D: hirdPartyJsexamples emplates1json-and-prototypejsindex.html

I did some changes to D: hirdPartyJsfreeze.py , after that, the error goes away.
--------------------------------

parts = string.split(dirname, '\')
for f in filenames:
out.append(('example', {'chapter':parts[1], 'name':parts[2], 'file':f}))


thanks!
-Ding

Message was edited by:
ding
ding (11) [Avatar] Offline
#4
Re: python freeze.py IndexError: list index out of range
Now I am getting 503: Service Unavailable exception

D: hirdPartyJs>python server.py
* Running on http://127.0.0.1:5000/

I have put a test page at root folder
D: hirdPartyJs est.html

then I try to access

http://publisher.dev:5000/test.html

I got 503: Service Unavailable exception

-Ding
benvinegar (68) [Avatar] Offline
#5
Re: python freeze.py IndexError: list index out of range
Hi Ding,

Did you add publisher.dev to your hosts file? If you don't see any output from the console (where you're running python server.py), that means that the server didn't receive your request: it's getting hung up somewhere.

- Ben
benvinegar (68) [Avatar] Offline
#6
Re: python freeze.py IndexError: list index out of range
As an aside, I applied your fix to the code. You can download the latest version here: https://github.com/thirdpartyjs/thirdpartyjs-code
benvinegar (68) [Avatar] Offline
#7
Re: python freeze.py IndexError: list index out of range
Ding – try accessing this URL instead: http://publisher.dev:5000/examples/index.html
ding (11) [Avatar] Offline
#8
Re: python freeze.py IndexError: list index out of range
thank you Ben for the quick response!

It was caused by our company proxy server. It is working fine on my home computer.

thanks a lot!