Python .app doesn't read .txt file like it should
Posted
by
Bambo
on Stack Overflow
See other posts from Stack Overflow
or by Bambo
Published on 2012-09-30T09:36:03Z
Indexed on
2012/09/30
9:37 UTC
Read the original article
Hit count: 206
This question relates to this one: Python app which reads and writes into its current working directory as a .app/exe
i got the path to the .txt file fine however now when i try to open it and read the contents it seems that it doesn't extract the data properly.
Here's my code - http://pastie.org/4876896
These are the errors i'm getting:
- 30/09/2012 10:28:49.103 [0x0-0x4e04e].org.pythonmac.unspecified.main: for index, item in enumerate( lines ): # iterate through lines
- 30/09/2012 10:28:49.103 [0x0-0x4e04e].org.pythonmac.unspecified.main: TypeError: 'NoneType' object is not iterable
I kind of understand what the errors mean however i'm not sure why they are being flagged up because if i run my script with it not in a .app form it doesn't get these errors and extracts the data fine.
© Stack Overflow or respective owner