Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #40837
| Date | 2013-03-07 19:23 -0500 |
|---|---|
| From | Dave Angel <davea@davea.name> |
| Subject | Re: Unhelpful traceback |
| References | <kh9c95$t68$1@dont-email.me> <mailman.3016.1362661824.2939.python-list@python.org> <khb0d7$q74$1@dont-email.me> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3063.1362702220.2939.python-list@python.org> (permalink) |
On 03/07/2013 04:23 PM, John Nagle wrote: > >> <snip> > > raise RuntimeError, 'open() requires mode "r", "U", or "rU"' > RuntimeError: open() requires mode "r", "U", or "rU" > > "b" for files is about end of line handling (CR LF -> LF), anyway. > Only for Python 2. Since originally you didn't specify, I took my best shot. If you omit the 'b' opening a binary file in Python 3, you'd get problems similar to yours. Text files will be converted to Unicode. That's one of the reasons that specifying the full environment is important. -- DaveA
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Unhelpful traceback John Nagle <nagle@animats.com> - 2013-03-06 22:33 -0800
Re: Unhelpful traceback Andrew Berg <bahamutzero8825@gmail.com> - 2013-03-07 00:57 -0600
Re: Unhelpful traceback Chris Rebert <clp2@rebertia.com> - 2013-03-06 23:04 -0800
Re: Unhelpful traceback Dave Angel <davea@davea.name> - 2013-03-07 08:10 -0500
Re: Unhelpful traceback John Nagle <nagle@animats.com> - 2013-03-07 10:42 -0800
Re: Unhelpful traceback John Nagle <nagle@animats.com> - 2013-03-07 14:13 -0800
Re: Unhelpful traceback Ian Kelly <ian.g.kelly@gmail.com> - 2013-03-07 15:32 -0700
Re: Unhelpful traceback John Nagle <nagle@animats.com> - 2013-03-07 13:23 -0800
Re: Unhelpful traceback Dave Angel <davea@davea.name> - 2013-03-07 19:23 -0500
csiph-web