When I try to import pytz at the top of my db.py model I'm getting the 
following error:

    No module named 'applications.paideia.modules.pytz'

"paideia" is the name of the application. I'm running python 3.7 and 
double-checked that pytz is accessible from the py3.7 interactive prompt. 
It is. So I don't understand why it's not being found.

This problem may be related to the fact that I'm using a brand-new 
apache/mod_wsgi setup. I don't know whether something in my apache 
configuration could be causing a problem. The welcome and admin apps work 
fine, though. It's only when I import a non-standard-library module.

But just in case, here's my server config:
(2.18.5-stable+timestamp.2019.04.08.04.22.03, Running on Apache/2.4.39 
(Unix) mod_wsgi/4.6.7 Python/3.7, Python 3.7.4)

ServerRoot "/home/ianwscott/webapps/paideia/apache2" 


#mime type for mpeg4 files 4 Addtype audio/mp4 .m4a 


LoadModule authz_core_module modules/mod_authz_core.so 
LoadModule dir_module modules/mod_dir.so 
LoadModule env_module modules/mod_env.so 
LoadModule log_config_module modules/mod_log_config.so 
LoadModule mime_module modules/mod_mime.so 
LoadModule rewrite_module modules/mod_rewrite.so 
LoadModule setenvif_module modules/mod_setenvif.so 
LoadModule wsgi_module modules/mod_wsgi.so 
LoadModule unixd_module modules/mod_unixd.so 


LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" 
\"%{User-Agent}i\"" combined 
CustomLog /home/ianwscott/logs/user/access_paideia.log combined 
ErrorLog /home/ianwscott/logs/user/error_paideia.log 


DirectoryIndex index.py 
DocumentRoot /home/ianwscott/webapps/paideia/htdocs 
Listen 16797 
KeepAlive Off 
SetEnvIf X-Forwarded-SSL on HTTPS=1 
ServerLimit 1 
StartServers 1 
MaxRequestWorkers 5 
MinSpareThreads 1 
MaxSpareThreads 3 
ThreadsPerChild 5 
WSGIDaemonProcess paideia processes=5 python-path=/home/ianwscott/webapps/
paideia/lib/python3.7 
WSGIProcessGroup paideia 

WSGIRestrictEmbedded On 
WSGILazyInitialization On 


WSGIScriptAlias / /home/ianwscott/webapps/paideia/web2py/wsgihandler.py 


<Directory /home/ianwscott/webapps/paideia/web2py> 
 AllowOverride None 
 Require all denied 
 <Files wsgihandler.py> 
 Require all granted 
 </Files> 
</Directory> 


<Directory /home/ianwscott/webapps/paideia/web2py/applications/*/static/> 
 Require all granted 
</Directory>

<Location /admin>
 Require all denied
</Location>

<LocationMatch ^/([^/]+)/appadmin>
 Require all denied 
</LocationMatch> 


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/d6ea73ae-9972-45ca-92e5-596ff40fda63%40googlegroups.com.

Reply via email to