These are chat archives for django/django

6th
Aug 2015
tannerp12
@tannerp12
Aug 06 2015 21:00
hi guys i'm trying to do the django girls tutorial and no ones answering over there at the moment can anyone answer a question? it may not be a quick fix but anything to get pointed in the right direction would be a big help.
André Duarte
@clint74
Aug 06 2015 21:03
@tannerp12 could you elaborate better your question?
tannerp12
@tannerp12
Aug 06 2015 21:03
I got to the end of the section to make my site live and my error log in Python Anywhere threw about 10 errors. I have been trying to find the files to see what the issue was and I can't find them. Is that a problem in itself? It is throwing me an: "Error running WSGI application". About half of the errors has to do with this: File "/bin/userwsgiwrapper.py" , and the other is this: File "/usr/lib/python3.4/logging/__init.py". Both of which I cannot find in my PythonAnywhere files.
André Duarte
@clint74
Aug 06 2015 21:06
can you copy the stack error and put here?
tannerp12
@tannerp12
Aug 06 2015 21:08
```2015-08-06 19:39:18,334 :Traceback (most recent call last):
2015-08-06 19:39:18,335 : File "/bin/userwsgiwrapper.py", line 130, in __call
2015-08-06 19:39:18,335 : self.error_log_file.logger.exception("Error running WSGI application")
2015-08-06 19:39:18,335 : File "/usr/lib/python3.4/logging/init.py", line 1296, in exception
2015-08-06 19:39:18,336 : self.error(msg, args, *kwargs)
2015-08-06 19:39:18,336 : File "/usr/lib/python3.4/logging/init.py", line 1289, in error
2015-08-06 19:39:18,337 : self._log(ERROR, msg, args,
kwargs)
2015-08-06 19:39:18,337 : File "/usr/lib/python3.4/logging/init.py", line 1395, in _log
2015-08-06 19:39:18,337 : self.handle(record)
File "/usr/lib/python3.4/logging/init.py", line 1404, in handle
if (not self.disabled) and self.filter(record):
File "/usr/lib/python3.4/logging/init.py", line 692, in filter
for f in self.filters:
File "/bin/userwsgiwrapper.py", line 122, in __call
app_iterator = self.app(environ, start_response)
File "/bin/user_wsgi_wrapper.py", line 136, in import_error_applicationraise e
2015-08-06 19:39:18,339 : File "/bin/user_wsgi_wrapper.py", line 145, in <module>
2015-08-06 19:39:18,339 : application = load_wsgi_application()
2015-08-06 19:39:18,339 : File "/bin/user_wsgi_wrapper.py", line 141, in load_wsgi_application
2015-08-06 19:39:18,339 : return import(os.environ['WSGI_MODULE'], globals(), locals(), ['application']).application
2015-08-06 19:39:18,339 : File "/var/www/tannerplato_pythonanywhere_com_wsgi.py", line 99
2015-08-06 19:39:18,340 :
2015-08-06 19:39:18,340 : ^
2015-08-06 19:39:18,340 :SyntaxError: unexpected EOF while parsing
sorry I hit enter on accident -.-
André Duarte
@clint74
Aug 06 2015 21:08
ok
seems to me that your problem is related to this file /var/www/tannerplato_pythonanywhere_com_wsgi.py
have you created a wsgi file?
tannerp12
@tannerp12
Aug 06 2015 21:12
yes, maybe it's not linked properly? what is unexpected EOF while parsing?
André Duarte
@clint74
Aug 06 2015 21:14
It is complaining about line 99 and this is weird, looking at http://tutorial.djangogirls.org/en/deploy/index.html#configuring-the-wsgi-file the number of lines expected is about 11.
tannerp12
@tannerp12
Aug 06 2015 21:15
actually, i fixed that. I missed a ")" at the end
André Duarte
@clint74
Aug 06 2015 21:15
:clap:
tannerp12
@tannerp12
Aug 06 2015 21:15
the new report throws about 500 errors
error lines
André Duarte
@clint74
Aug 06 2015 21:17
look at the bottom of the stack error to find something related to your project
tannerp12
@tannerp12
Aug 06 2015 21:17
wont paste that but it seems like the bottommostmost problem is ImportError: No module named 'mysite.settings' , its not recognizing my whole site basically
André Duarte
@clint74
Aug 06 2015 21:18
I don't know nothing about PythonAnywhere, its possible to share the environment?
tannerp12
@tannerp12
Aug 06 2015 21:19
do you mean my bash console?
André Duarte
@clint74
Aug 06 2015 21:21
Your remote console
tannerp12
@tannerp12
Aug 06 2015 21:22
yep, do you have a username with them or do you want and email?
André Duarte
@clint74
Aug 06 2015 21:22
I've been using https://c9.io and is possible to share the env for educational purposes
No, I dont have an account there, let me see
My user is clint74
tannerp12
@tannerp12
Aug 06 2015 21:26
says you have to confirm an email or go to it with this link: https://www.pythonanywhere.com/user/tannerplato/consoles/bash/1579416/
André Duarte
@clint74
Aug 06 2015 21:29
ok
@tannerp12 how can I access the blog , wich address?
tannerp12
@tannerp12
Aug 06 2015 21:33
tannerplato.pythonanywhere.com
André Duarte
@clint74
Aug 06 2015 21:33
I am trying to find the logs
tannerp12
@tannerp12
Aug 06 2015 21:36
@clint74 tannerplato.pythonanywhere.com.error.log
André Duarte
@clint74
Aug 06 2015 21:37
@tannerp12 ok, I've found, seems that you have a problem with you path
@tannerp12 can you see what I am doing on you env?
in your wsgi file
path = '/home/tannerplato/my-first-blog'  # use your own username here
if path not in sys.path:
    sys.path.append(path)
try this
```
André Duarte
@clint74
Aug 06 2015 21:46
ooops
path = '/home/tannerplato/my-first-blog/mysite'
tannerp12
@tannerp12
Aug 06 2015 21:58
Thanks again for all the help, @clint74
André Duarte
@clint74
Aug 06 2015 22:00
@tannerp12 'De nada' we say in Brazil :smile: