[Python-porting] Questions for porting unicode with backward compatibility
Lennart Regebro
regebro at gmail.com
Wed May 22 08:38:45 CEST 2013
On Wed, May 22, 2013 at 12:38 AM, Chitrank Dixit
<chitrankdixit at gmail.com> wrote:
> Okay module six is made good but it lacks in some cases
>
> I am referring this documentation of six module
> http://pythonhosted.org/six/
>
> and getting problem in this line from six.moves import html_entities,
> html_parser
> I have installed six module in both python 2 and python 3.3 but I am getting
> problem in python 3.3 it says
>
> Traceback (most recent call last):
> File "html.py", line 34, in <module>
> from six.moves import html_entities, html_parser
> File "/usr/local/lib/python3.3/dist-packages/six.py", line 84, in __get__
> result = self._resolve()
> File "/usr/local/lib/python3.3/dist-packages/six.py", line 103, in
> _resolve
> return _import_module(self.mod)
> File "/usr/local/lib/python3.3/dist-packages/six.py", line 74, in
> _import_module
> __import__(name)
> File
> "/home/chitrank/Documents/Google_Summer_of_code/moinmoin_pre/Emeraldtree/EmeraldTree/emeraldtree/html.py",
> line 34, in <module>
> from six.moves import html_entities, html_parser
> File "/usr/local/lib/python3.3/dist-packages/six.py", line 84, in __get__
> result = self._resolve()
> File "/usr/local/lib/python3.3/dist-packages/six.py", line 103, in
> _resolve
> return _import_module(self.mod)
> File "/usr/local/lib/python3.3/dist-packages/six.py", line 74, in
> _import_module
> __import__(name)
> ImportError: No module named 'html.entities'; html is not a package
>
> What could be the error please let me know
Can you do this:
import html
print(html.__file__)
It sounds like the html module somehow has been shadowed by something else.
//Lennart
More information about the Python-porting
mailing list