Discussion:
__package__ set to none by development server
Aashish Goyal
2014-07-13 11:46:40 UTC
Permalink
Hi there,

I recently restructured my app into a package structure with a few
sub-modules for better modularity. The program works perfectly well while
using gunicorn as the web server, but complains when I use bottle's inbuilt
server

-> ValueError: Attempted relative import in non-package.

After trying to find the problem I detected that as soon as I call
bottle.run the __package__ is set to None, hence breaking my code. I have
no clue why is this happening. Could someone suggest me how to fix this or
enlighten me with what I am missing.

I use the inbuilt server mainly for debugging. If this is an issue with the
server, can I use something else with equivalent ease of debugging.


Thank you
Aashish
--
--
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.

---
You received this message because you are subscribed to the Google Groups "bottlepy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bottlepy+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...