This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Lukáš.Němec
Recipients Lukáš.Němec
Date 2013-07-30.10:30:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1375180244.43.0.821767780261.issue18598@psf.upfronthosting.co.za>
In-reply-to
Content
Hello,

recently I filed this bugreport to Django, but they clarified this by pointing me to commits for new version of Django that uses python builtin importlib (import_module)

But since most of their import_module code is done like [import_module(x) for y if blahblah], it is very difficult for me to debug code where Django tries to import some package, and all I get back is message "relative imports require the 'package' argument"

This message tells me exactly nothing :), just that something somewhere, even 3rd party app tried to do relative imports ...

what did it import, with what parameters?

I edited this locally for debugging, and changed it to this:
"relative imports require the 'package' argument, package: %s" % name

This simple change of the message allowed me to find the problem in a few seconds..

Would you please consider adding something similar to importlib for better debugging?

Thank you :)
History
Date User Action Args
2013-07-30 10:30:44Lukáš.Němecsetrecipients: + Lukáš.Němec
2013-07-30 10:30:44Lukáš.Němecsetmessageid: <1375180244.43.0.821767780261.issue18598@psf.upfronthosting.co.za>
2013-07-30 10:30:44Lukáš.Němeclinkissue18598 messages
2013-07-30 10:30:43Lukáš.Němeccreate