Forums

Module not found

Hello I'm having a problem, I develop my app in djgno 1.4, so I did the virtualenv thing, but I having this error, I don't, I know why I was reading before and I tought that It was because of the version of Django, that's why I did the virtualenv,

2013-09-14 18:08:22,664 :    app = import_module(appname)
2013-09-14 18:08:22,665 :  File "/home/mediexcel2/.virtualenvs/django14/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
2013-09-14 18:08:22,665 :    __import__(name)
2013-09-14 18:08:22,665 :ImportError: No module named ExpMedico

my wsgi file looks like this:

activate_this = '/home/mediexcel2/.virtualenvs/django14/bin/activate_this.py'
execfile(activate_this, dict(__file__=activate_this))

import os
import sys

path = '/home/mediexcel2/proyectomediexcel/ProyectoMediExcel'
if path not in sys.path:
    sys.path.append(path)
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

Cna someone help me????

(Edited by admin: formatting)

It looks like the directory containing ExpMedico is not on your system path. Is it in /home/mediexcel2/proyectomediexcel/ProyectoMediExcel?

Thanks for your answer, that's was all the problem :) I know you are staff so I hope you can help me with this, I need to upload my data base from a dump sql file, can you tell me how to do it, 'cause I been searching for info on how to do it but I don't find anything, I use mysql ./ command, but It doesn't do anything, The app that I'm uploading is from my work, so i'm new with this, I hope you can help me :)

If I've understood you correctly, you have a sql dump file, called eg dump.sql, which you want to load into your database.

Have a look at this stackoverflow post: http://stackoverflow.com/questions/105776/how-do-i-restore-a-mysql-dump-file

The only thing to change from those instructions is that you need to specify the database host, mysql.server, using -hmysql.server

Do from a Bash console, it will be something like this:

mysql -uyourusername -hmysql.server -p < dump.sql

I can't make it work :( I been using several syntax and none of them work.

-u mediexcel2 -h mysql.server -p <Dump.sql;



ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to    your MySQL server version for the right syntax to use near '-u mediexcel2 -h mysql.server -p <Dump.sql

-u mediexcel2 -h mysql.server -p <Dum' at line 1

Hi mediexcel2 -- it looks to me like you're starting a MySQL console and then typing -u mediexcel2 -h mysql.server -p <Dump.sql; into it. That's the only way I can imagine you'd get the error you're seeing.

To do the dump, please do the following:

  • Start a Bash console from the consoles tab.
  • In the Bash console, type the following exactly as it is here (no extra spaces):

    mysql -umediexcel2 -hmysql.server -p < dump.sql

  • It will ask you for your password. Enter it.

  • Your data will be put into the database.

...ah, just saw that rcs1000 explained this to you in another thread.