Vladlen777 / medtest

0 stars 0 forks source link

Проблема с запуском проекта #1

Open Sergik666 opened 6 years ago

Sergik666 commented 6 years ago

C:\Users\sergey\AppData\Local\Programs\Python\Python36-32\python.exe C:/!/4234234234/medtest/manage.py runserver 8000

Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x06B2ECD8>
Traceback (most recent call last):
  File "C:\Users\sergey\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\db\backends\mysql\base.py", line 15, in <module>
    import MySQLdb as Database
ModuleNotFoundError: No module named 'MySQLdb'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\sergey\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\utils\autoreload.py", line 225, in wrapper
    fn(*args, **kwargs)
  File "C:\Users\sergey\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\management\commands\runserver.py", line 113, in inner_run
    autoreload.raise_last_exception()
  File "C:\Users\sergey\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\utils\autoreload.py", line 248, in raise_last_exception
    raise _exception[1]
  File "C:\Users\sergey\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\management\__init__.py", line 327, in execute
    autoreload.check_errors(django.setup)()
  File "C:\Users\sergey\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\utils\autoreload.py", line 225, in wrapper
    fn(*args, **kwargs)
  File "C:\Users\sergey\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "C:\Users\sergey\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\apps\registry.py", line 112, in populate
    app_config.import_models()
  File "C:\Users\sergey\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\apps\config.py", line 198, in import_models
    self.models_module = import_module(models_module_name)
  File "C:\Users\sergey\AppData\Local\Programs\Python\Python36-32\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 978, in _gcd_import
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load
  File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
  File "C:\Users\sergey\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\contrib\auth\models.py", line 2, in <module>
    from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
  File "C:\Users\sergey\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\contrib\auth\base_user.py", line 47, in <module>
    class AbstractBaseUser(models.Model):
  File "C:\Users\sergey\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\db\models\base.py", line 114, in __new__
    new_class.add_to_class('_meta', Options(meta, app_label))
  File "C:\Users\sergey\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\db\models\base.py", line 315, in add_to_class
    value.contribute_to_class(cls, name)
  File "C:\Users\sergey\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\db\models\options.py", line 205, in contribute_to_class
    self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
  File "C:\Users\sergey\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\db\__init__.py", line 33, in __getattr__
    return getattr(connections[DEFAULT_DB_ALIAS], item)
  File "C:\Users\sergey\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\db\utils.py", line 202, in __getitem__
    backend = load_backend(db['ENGINE'])
  File "C:\Users\sergey\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\db\utils.py", line 110, in load_backend
    return import_module('%s.base' % backend_name)
  File "C:\Users\sergey\AppData\Local\Programs\Python\Python36-32\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "C:\Users\sergey\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\db\backends\mysql\base.py", line 20, in <module>
    ) from err
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
Did you install mysqlclient?
Vladlen777 commented 6 years ago

I installed mysql-server. Link to the installation site: https://www.8host.com/blog/ustanovka-mysql-on-ubuntu-16-04/ Installation commands: sudo apt-get update sudo apt-get install mysql-server sudo mysql_secure_installation

Vladlen777 commented 6 years ago

I still put mysqlclient. Link to the installation site: https://www.digitalocean.com/community/tutorials/how-to-use-mysql-or-mariadb-with-your-django-application-on-ubuntu-14-04

Vladlen777 commented 6 years ago

I have a python 3.5

Sergik666 commented 6 years ago

у меня винда

Vladlen777 commented 6 years ago

Сергей, добрый вечер. Вот ссылка для установки mysql для винды: https://dev.mysql.com/downloads/mysql/ Под виндой для связи с Python я ставил mysql-connector: https://pypi.python.org/pypi/mysql-connector-python В настройках сайта нужно тогда указать 'ENGINE': 'mysql.connector.django', А не проще мне подойти к Вам с ноутом и показать работу сайта ?

2018-02-07 20:02 GMT+02:00 Sergey Vasylchenko notifications@github.com:

у меня винда

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Vladlen777/medtest/issues/1#issuecomment-363856013, or mute the thread https://github.com/notifications/unsubscribe-auth/Ah_Ru_Kk79lt90G9f2qGROJeSMJprHzoks5tSeUZgaJpZM4R8nMd .

Sergik666 commented 6 years ago

А у Вас готовы задания по C#?

Vladlen777 commented 6 years ago

Добрый день, Сергей. Я не знаком с C#. Мне интересно работать с питоном. Раньше я интересовался C++. Я думаю можно выучить C# в процессе работы.

2018-02-08 8:00 GMT+02:00 Sergey Vasylchenko notifications@github.com:

А у Вас готовы задания по C#?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Vladlen777/medtest/issues/1#issuecomment-364011442, or mute the thread https://github.com/notifications/unsubscribe-auth/Ah_Ruw8fP_CvOnB0l6HZwHzHiXJ40d1zks5tSo2LgaJpZM4R8nMd .