Re: Error running WSGI application

2018-06-04 Thread Joseph Mutumi
Hello,

Check
https://help.pythonanywhere.com/pages/DebuggingImportError/#django-specific-issues

And make sure your directory structure is as recommended:

/home/myusername
`-- myproject/
|-- __init__.py
`-- myproject/
|-- __init__.py
`-- settings.py

If it is not, then correct the sys.path.append(path) in your wsgi file to
where ever it is e.g.: sys.path.append(os.path.dirname(path))

Hope it helps.

Kind regards

On Sat, May 26, 2018 at 9:02 PM, Kadir Guloglu 
wrote:

> Hi friends.
>
>
>  Can I help we please. My project getting exception.
>
>
> WSGI File:
>
> import os
>
> import sys
>
>
> path = os.path.expanduser('~/otomabak')
>
> if path not in sys.path:
>
> sys.path.append(path)
>
>
> os.environ['DJANGO_SETTINGS_MODULE'] = 'otomabak.settings'
>
>
> from django.core.wsgi import get_wsgi_application
>
> from django.contrib.staticfiles.handlers import StaticFilesHandler
>
> application = StaticFilesHandler(get_wsgi_application())
>
>
>
> Server Error :
>
> 2018-05-26 17:43:02,582: Error running WSGI application
> 2018-05-26 17:43:02,583: ModuleNotFoundError: No module named 
> 'otomabak.settings'
> 2018-05-26 17:43:02,583:   File 
> "/var/www/kadirguloglu_pythonanywhere_com_wsgi.py", line 12, in 
> 2018-05-26 17:43:02,583: application = 
> StaticFilesHandler(get_wsgi_application())
> 2018-05-26 17:43:02,583:
> 2018-05-26 17:43:02,583:   File 
> "/home/kadirguloglu/otomabak/otomabakenv/lib/python3.6/site-packages/django/core/wsgi.py",
>  line 12, in get_wsgi_application
> 2018-05-26 17:43:02,583: django.setup(set_prefix=False)
> 2018-05-26 17:43:02,584:
> 2018-05-26 17:43:02,584:   File 
> "/home/kadirguloglu/otomabak/otomabakenv/lib/python3.6/site-packages/django/__init__.py",
>  line 19, in setup
> 2018-05-26 17:43:02,584: configure_logging(settings.LOGGING_CONFIG, 
> settings.LOGGING)
> 2018-05-26 17:43:02,584:
> 2018-05-26 17:43:02,584:   File 
> "/home/kadirguloglu/otomabak/otomabakenv/lib/python3.6/site-packages/django/conf/__init__.py",
>  line 56, in __getattr__
> 2018-05-26 17:43:02,584: self._setup(name)
> 2018-05-26 17:43:02,584:
> 2018-05-26 17:43:02,584:   File 
> "/home/kadirguloglu/otomabak/otomabakenv/lib/python3.6/site-packages/django/conf/__init__.py",
>  line 43, in _setup
> 2018-05-26 17:43:02,584: self._wrapped = Settings(settings_module)
> 2018-05-26 17:43:02,585:
> 2018-05-26 17:43:02,585:   File 
> "/home/kadirguloglu/otomabak/otomabakenv/lib/python3.6/site-packages/django/conf/__init__.py",
>  line 106, in __init__
> 2018-05-26 17:43:02,585: mod = 
> importlib.import_module(self.SETTINGS_MODULE)
> 2018-05-26 17:43:02,585: ***
> 2018-05-26 17:43:02,585: If you're seeing an import error and don't know why,
> 2018-05-26 17:43:02,585: we have a dedicated help page to help you debug:
> 2018-05-26 17:43:02,585: 
> https://help.pythonanywhere.com/pages/DebuggingImportError/
> 2018-05-26 
> <https://help.pythonanywhere.com/pages/DebuggingImportError/2018-05-26> 
> 17:43:02,585: ***
>
>
>
> *Thanks for help*
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/560746fa-8d6f-4a45-ae44-43ee8bf53eb6%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/560746fa-8d6f-4a45-ae44-43ee8bf53eb6%40googlegroups.com?utm_medium=email_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAN5idp_ZFKzvLtEpxBJpHPgx_TbE8ihKp5zDK7YSwi7e4GmAXw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Error running WSGI application

2018-05-26 Thread Kadir Guloglu


Hi friends. 


 Can I help we please. My project getting exception.


WSGI File:

import os

import sys


path = os.path.expanduser('~/otomabak')

if path not in sys.path:

sys.path.append(path)


os.environ['DJANGO_SETTINGS_MODULE'] = 'otomabak.settings'


from django.core.wsgi import get_wsgi_application

from django.contrib.staticfiles.handlers import StaticFilesHandler

application = StaticFilesHandler(get_wsgi_application())



Server Error : 

2018-05-26 17:43:02,582: Error running WSGI application
2018-05-26 17:43:02,583: ModuleNotFoundError: No module named 
'otomabak.settings'
2018-05-26 17:43:02,583:   File 
"/var/www/kadirguloglu_pythonanywhere_com_wsgi.py", line 12, in 
2018-05-26 17:43:02,583: application = 
StaticFilesHandler(get_wsgi_application())
2018-05-26 17:43:02,583: 
2018-05-26 17:43:02,583:   File 
"/home/kadirguloglu/otomabak/otomabakenv/lib/python3.6/site-packages/django/core/wsgi.py",
 line 12, in get_wsgi_application
2018-05-26 17:43:02,583: django.setup(set_prefix=False)
2018-05-26 17:43:02,584: 
2018-05-26 17:43:02,584:   File 
"/home/kadirguloglu/otomabak/otomabakenv/lib/python3.6/site-packages/django/__init__.py",
 line 19, in setup
2018-05-26 17:43:02,584: configure_logging(settings.LOGGING_CONFIG, 
settings.LOGGING)
2018-05-26 17:43:02,584: 
2018-05-26 17:43:02,584:   File 
"/home/kadirguloglu/otomabak/otomabakenv/lib/python3.6/site-packages/django/conf/__init__.py",
 line 56, in __getattr__
2018-05-26 17:43:02,584: self._setup(name)
2018-05-26 17:43:02,584: 
2018-05-26 17:43:02,584:   File 
"/home/kadirguloglu/otomabak/otomabakenv/lib/python3.6/site-packages/django/conf/__init__.py",
 line 43, in _setup
2018-05-26 17:43:02,584: self._wrapped = Settings(settings_module)
2018-05-26 17:43:02,585: 
2018-05-26 17:43:02,585:   File 
"/home/kadirguloglu/otomabak/otomabakenv/lib/python3.6/site-packages/django/conf/__init__.py",
 line 106, in __init__
2018-05-26 17:43:02,585: mod = importlib.import_module(self.SETTINGS_MODULE)
2018-05-26 17:43:02,585: ***
2018-05-26 17:43:02,585: If you're seeing an import error and don't know why,
2018-05-26 17:43:02,585: we have a dedicated help page to help you debug: 
2018-05-26 17:43:02,585: 
https://help.pythonanywhere.com/pages/DebuggingImportError/
2018-05-26 17:43:02,585: ***



*Thanks for help*

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/560746fa-8d6f-4a45-ae44-43ee8bf53eb6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Error running WSGI application

2018-05-26 Thread Kadir Guloglu


Hi friends.  Can I help we please. My project getting exception. 
 Exception Detail:  2018-05-26 17:43:02,582: Error 
running WSGI application  2018-05-26 17:43:02,583: 
ModuleNotFoundError: No module named 'otomabak.settings'  2018-05-26 
17:43:02,583: File "/var/www/kadirguloglu_pythonanywhere_com_wsgi.py", line 
12, in   2018-05-26 17:43:02,583: application = 
StaticFilesHandler(get_wsgi_application())  2018-05-26 17:43:02,583: 
 2018-05-26 17:43:02,583: File 
"/home/kadirguloglu/otomabak/otomabakenv/lib/python3.6/site-packages/django/core/wsgi.py",
 
line 12, in get_wsgi_application  2018-05-26 17:43:02,583: 
django.setup(set_prefix=False)  2018-05-26 17:43:02,584:  
2018-05-26 17:43:02,584: File 
"/home/kadirguloglu/otomabak/otomabakenv/lib/python3.6/site-packages/django/
*init*.py", line 19, in setup  2018-05-26 17:43:02,584: 
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING) 
2018-05-26 17:43:02,584:  2018-05-26 17:43:02,584: File 
"/home/kadirguloglu/otomabak/otomabakenv/lib/python3.6/site-packages/django/conf/
*init*.py", line 56, in *getattr* 2018-05-26 17:43:02,584: 
self._setup(name) 2018-05-26 17:43:02,584:  2018-05-26 
17:43:02,584: File 
"/home/kadirguloglu/otomabak/otomabakenv/lib/python3.6/site-packages/django/conf/
*init*.py", line 43, in _setup 2018-05-26 17:43:02,584: self._wrapped 
= Settings(settings_module) 2018-05-26 17:43:02,585:  2018-05-26 
17:43:02,585: File 
"/home/kadirguloglu/otomabak/otomabakenv/lib/python3.6/site-packages/django/conf/
*init*.py", line 106, in *init* 2018-05-26 17:43:02,585: mod = 
importlib.import_module(self.SETTINGS_MODULE) 2018-05-26 17:43:02,585: 
** 2018-05-26 17:43:02,585: If you're seeing an 
import error and don't know why, 2018-05-26 17:43:02,585: we have a 
dedicated help page to help you debug:  2018-05-26 17:43:02,585: 
https://help.pythonanywhere.com/pages/DebuggingImportError/ 2018-05-26 
17:43:02,585: 

 WSGI file:  import os import sys

path = os.path.expanduser('~/otomabak') if path not in sys.path: 
 sys.path.append(path)

os.environ['DJANGO_SETTINGS_MODULE'] = 'otomabak.settings'  from 
django.core.wsgi import get_wsgi_application from 
django.contrib.staticfiles.handlers import StaticFilesHandler 
application = StaticFilesHandler(get_wsgi_application())

 Thanks for help

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e8f137b0-59a8-45d0-a017-6a1e70c0477c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.