Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLALCHEMY error #1

Open
Ezekiah opened this issue Jul 3, 2014 · 1 comment
Open

SQLALCHEMY error #1

Ezekiah opened this issue Jul 3, 2014 · 1 comment

Comments

@Ezekiah
Copy link

Ezekiah commented Jul 3, 2014

Hello,

I have a problem, apache logs some errors from my moai server :

mod_wsgi (pid=21919): Target WSGI script '/store/www/moai/moai.wsgi' cannot be loaded as Python module.
OperationalError: (OperationalError) unable to open database file None None

Here is my wsgi file : https://gist.github.com/Ezekiah/9356dcf672f7654a0505

Here is the stacktrace, could you help me please ?
https://gist.github.com/Ezekiah/8bad427b563cb7219800#file-gistfile1-txt

Best regards

@m6mb3rtx
Copy link

I had the exact same problem.

My moai instance was in development mode, then when i switched to apache to handle production mode the "OperationalError: (OperationalError) unable to open database file None None" error appeared.

After a day long trying to make it work i found that the paths pointing databases in my settings.ini file were the problem.

You need to change from relative to absolute path in the settings.ini file

before:

sqlite:///moai-example.db

after:

sqlite:////opt/MOAI-2.0.0/moai-example.db

Then in apache

<VirtualHost *:8080>
    ServerName hostname
    WSGIScriptAlias / /opt/MOAI-2.0.0/moai.wsgi
    LogLevel debug

  <Directory /opt/MOAI-2.0.0/ >
      Order deny,allow
      Allow from all
  </Directory>
     CustomLog /var/log/apache2/access_MOAI_8080.log combined
     ErrorLog /var/log/apache2/error_MOAI_8080.log
</VirtualHost>

Finally Apache handle the moai instance.

slowpoke
I hope it helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants