[New-bugs-announce] [issue21720] "TypeError: Item in ``from list'' not a string" message

David Szotten report at bugs.python.org
Wed Jun 11 15:28:45 CEST 2014


New submission from David Szotten:

```
>>> __import__('fabric.', fromlist=[u'api'])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
```

accidentally ended up with something like this via some module that was using `unicode_literals`. stumped me for a second until i realised that my variable was a string, but not `str`. would be nice with a custom error message if this is a unicode string, explicitly mentioning that these must not be unicode or similar

----------
messages: 220267
nosy: davidszotten
priority: normal
severity: normal
status: open
title: "TypeError: Item in ``from list'' not a string"  message
type: enhancement
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21720>
_______________________________________


More information about the New-bugs-announce mailing list