Jump to content
Ch7: Put_To_Store Write Error
2 replies to this topic
Posted 29 March 2011 - 07:32 AM
I'm not sure what's going on here. I'm working through the chapter 7 webapp, I'm now at the point of generating the timing data.
I discovered that the athlete dictionary was blank and I was getting a key error. Adding 'file=stderr' on in the athletemodel put_to_store and get_from_store, I noticed I was getting a write error.
Now, the athlete.pickle file is being created, but the file isn't being written to.
My first though was this was a Windows 7 UAC problem. So I first moved my webapps folder into my user folder, rather then the C:\Dev folder I had been working in. No luck. So then launched the command prompt with administrator privileges (keeping the webapp folder in the user's folder). I still got the write error.
Posted 29 March 2011 - 07:35 AM
Printing the athlete dictionary in generate_list.py, immediately after the put_to_store call, shows the dictionary as being complete.
The athletes.pickle files isn't marked as read-only either.
Edited by Digital_Ronin, 29 March 2011 - 07:47 AM.
Posted 29 March 2011 - 07:53 AM
Found my error. I had 'rb' instead of 'wb' in the put_to_store open function.
Last time I checked I don't want to "rite" to a file.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users