squeaky-pl / japronto

Screaming-fast Python 3.5+ HTTP toolkit integrated with pipelining HTTP server based on uvloop and picohttpparser.
MIT License
8.61k stars 581 forks source link

Bug found when 'from japronto import Application' #71

Closed ghosttk closed 7 years ago

ghosttk commented 7 years ago

In example/8_html/html.py With the name "html.py",running this script results "ImportError: cannot import name 'Application'". When change it's name from "html.py" to "htm.py" or anything else,script runs with no errors.

alexandremasbr commented 7 years ago

It should be a namespace problem. html probably is used in another module.

Em 27/04/2017 04:59, "ghosttk" notifications@github.com escreveu:

In example/8_html/html.py With the name "html.py",running this script results "ImportError: cannot import name 'Application'". When change it's name from "html.py" to "htm.py" or anything else,script runs with no errors.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/squeaky-pl/japronto/issues/71, or mute the thread https://github.com/notifications/unsubscribe-auth/AZlo55wB57RT4xboMAaiROIkwcDl3Jv4ks5r0ErbgaJpZM4NJ3ZF .

ghosttk commented 7 years ago

This makes sence,I found a python3 buildin module named 'html'.

squeaky-pl commented 7 years ago

Fixed as of 866bca3d910f8aee788f6861ec3770b4f09c1ae9

WesleyBatista commented 6 years ago

This issue happened with me too. The problem was that my script file was named as japronto.py. Renamed to a different name than the package and it worked.