Ubuntu
在 ubuntu 伺服器上使用 uwsgi 安裝 Pootle
我正在嘗試在 uwsgi 下的 ubuntu 伺服器上安裝 Pootle 伺服器。雖然我的本地開發伺服器上一切正常,但線上時我遇到了這個錯誤,我無法克服。它似乎與應用程序相關,而不是與伺服器相關,但因為它適用於我的(相同的)開發伺服器……天哪……我不知道!
提前tnx!加布里埃爾
[uWSGI] getting INI configuration from pootle.ini *** Starting uWSGI 0.9.9-dev-1458-unbit (32bit) on [Fri Sep 2 18:53:36 2011] *** compiled with version: 4.2.4 (Ubuntu 4.2.4-1ubuntu4) on 29 August 2011 11:37:34 detected binary path: /opt/unbit/bin/uwsgi your process address space limit is 67108864 bytes (64 MB) your memory page size is 4096 bytes uwsgi socket 0 inherited UNIX address /var/lib/apache2/upstream/13981_upstream.sock fd 0 Python version: 2.5.2 (r252:60911, Jan 20 2010, 22:05:59) [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)] Set PythonHome to /accounts/gabriobald/www/translate.9thcircle.it Python main interpreter initialized at 0x91cc2b8 *** Operational MODE: single process *** added /accounts/gabriobald/www/ to pythonpath. WSGI application 0 (mountpoint=) ready on interpreter 0x91cc2b8 pid: 16484 (default app) *** uWSGI is running in multiple interpreter mode *** spawned uWSGI master process (pid: 16484) spawned uWSGI worker 1 (pid: 16486, cores: 1) Traceback (most recent call last): File "/accounts/gabriobald/www/translate.9thcircle.it/lib/python2.5/site-packages/django/core/handlers/wsgi.py", line 250, in __call__ self.load_middleware() File "/accounts/gabriobald/www/translate.9thcircle.it/lib/python2.5/site-packages/django/core/handlers/base.py", line 47, in load_middleware raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' % (mw_module, e)) django.core.exceptions.ImproperlyConfigured: Error importing middleware pootle_misc.middleware.baseurl: "No module named pootle_misc.middleware.baseurl" [pid: 16486|app: 0|req: 1/1] 88.50.43.19 () {38 vars in 863 bytes} [Fri Sep 2 18:53:38 2011] GET / => generated 0 bytes in 167 msecs (HTTP/1.1 500) 0 headers in 0 bytes (0 switches on core 0) Traceback (most recent call last): File "/accounts/gabriobald/www/translate.9thcircle.it/lib/python2.5/site-packages/django/core/handlers/wsgi.py", line 250, in __call__ self.load_middleware() File "/accounts/gabriobald/www/translate.9thcircle.it/lib/python2.5/site-packages/django/core/handlers/base.py", line 47, in load_middleware raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' % (mw_module, e)) django.core.exceptions.ImproperlyConfigured: Error importing middleware pootle_misc.middleware.baseurl: "No module named pootle_misc.middleware.baseurl" [pid: 16486|app: 0|req: 2/2] 88.50.43.19 () {36 vars in 794 bytes} [Fri Sep 2 18:53:38 2011] GET /favicon.ico => generated 0 bytes in 2 msecs (HTTP/1.1 500) 0 headers in 0 bytes (0 switches on core 0)
Error importing middleware pootle_misc.middleware.baseurl: "No module named pootle_misc.middleware.baseurl"
這意味著它無法載入應用程序所需的 python 程式碼。由於 django 是從站點包執行的,因此該
pootle_misc
模組可能應該在其中(或者在相對路徑中也可以)。在其中尋找一個pootle_misc
目錄/accounts/gabriobald/www/translate.9thcircle.it/lib/python2.5/site-packages/
——它可能在您的開發系統上,而不是在您的實時系統上。