Forums

Server Error (500)

I am getting "Server Error (500)" when i try to access my site. Any help would be appreciate it I am new Pythonanywhere.

Going to your website right now, it doesn't seem like there are any issues- have you solved this yourself?

Yes I solved it after couple of hours of digging. Thank you

Great -- glad you worked it out!

I am also getting a 500 server error. The page says "oops something went wrong".

The access.log states:

[12/Dec/2018:10:35:59 +0000] "GET /favicon.ico HTTP/1.1" 500 1231 "http://www.velocitycapitalunited.com/"

The error.log states:

FileNotFoundError: File b'../capital/mpg.csv' does not exist 2018-12-12 11:14:13,911: Error running WSGI application 2018-12-12 11:14:13,913: FileNotFoundError: File b'../capital/mpg.csv' does not exist 2018-12-12 11:14:13,913: File "/home/Nasrallas2/.virtualenvs/velocity/lib/python3.6/site-packages/django/core/handlers/wsgi.py", line 146, in call 2018-12-12 11:14:13,913: response = self.get_response(request) 2018-12-12 11:14:13,913: 2018-12-12 11:14:13,914: File "/home/Nasrallas2/.virtualenvs/velocity/lib/python3.6/site-packages/django/core/handlers/base.py", line 81, in get_response 2018-12-12 11:14:13,914: response = self._middleware_chain(request) 2018-12-12 11:14:13,914: 2018-12-12 11:14:13,914: File "/home/Nasrallas2/.virtualenvs/velocity/lib/python3.6/site-packages/django/core/handlers/exception.py", line 37, in inner 2018-12-12 11:14:13,914: response = response_for_exception(request, exc) 2018-12-12 11:14:13,914: 2018-12-12 11:14:13,914: File "/home/Nasrallas2/.virtualenvs/velocity/lib/python3.6/site-packages/django/core/handlers/exception.py", line 87, in response_for_exception 2018-12-12 11:14:13,914: response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info()) 2018-12-12 11:14:13,915: 2018-12-12 11:14:13,915: File "/home/Nasrallas2/.virtualenvs/velocity/lib/python3.6/site-packages/django/core/handlers/exception.py", line 125, in handle_uncaught_exception 2018-12-12 11:14:13,915: callback, param_dict = resolver.resolve_error_handler(500) 2018-12-12 11:14:13,915: 2018-12-12 11:14:13,915: File "/home/Nasrallas2/.virtualenvs/velocity/lib/python3.6/site-packages/django/urls/resolvers.py", line 549, in resolve_error_handler 2018-12-12 11:14:13,915: callback = getattr(self.urlconf_module, 'handler%s' % view_type, None) 2018-12-12 11:14:13,915: 2018-12-12 11:14:13,916: File "/home/Nasrallas2/.virtualenvs/velocity/lib/python3.6/site-packages/django/utils/functional.py", line 36, in get 2018-12-12 11:14:13,916: res = instance.dict[self.name] = self.func(instance) 2018-12-12 11:14:13,916: 2018-12-12 11:14:13,916: File "/home/Nasrallas2/.virtualenvs/velocity/lib/python3.6/site-packages/django/urls/resolvers.py", line 529, in urlconf_module 2018-12-12 11:14:13,916: return import_module(self.urlconf_name) 2018-12-12 11:14:13,916: 2018-12-12 11:14:13,916: File "/home/Nasrallas2/vcu/capital/capital/urls.py", line 18, in <module> 2018-12-12 11:14:13,917: from . import views 2018-12-12 11:14:13,917: 2018-12-12 11:14:13,917: File "/home/Nasrallas2/vcu/capital/capital/views.py", line 153, in <module> 2018-12-12 11:14:13,917: df = pd.read_csv('../capital/mpg.csv') 2018-12-12 11:14:13,917: 2018-12-12 11:14:13,917: File "/home/Nasrallas2/.virtualenvs/velocity/lib/python3.6/site-packages/pandas/io/parsers.py", line 678, in parser_f 2018-12-12 11:14:13,917: return _read(filepath_or_buffer, kwds) 2018-12-12 11:14:13,918: 2018-12-12 11:14:13,918: File "/home/Nasrallas2/.virtualenvs/velocity/lib/python3.6/site-packages/pandas/io/parsers.py", line 440, in _read 2018-12-12 11:14:13,918: parser = TextFileReader(filepath_or_buffer, kwds) 2018-12-12 11:14:13,918: 2018-12-12 11:14:13,918: File "/home/Nasrallas2/.virtualenvs/velocity/lib/python3.6/site-packages/pandas/io/parsers.py", line 787, in init 2018-12-12 11:14:13,918: self._make_engine(self.engine) 2018-12-12 11:14:13,918: 2018-12-12 11:14:13,918: File "/home/Nasrallas2/.virtualenvs/velocity/lib/python3.6/site-packages/pandas/io/parsers.py", line 1014, in _make_engine 2018-12-12 11:14:13,919: self._engine = CParserWrapper(self.f, self.options) 2018-12-12 11:14:13,919: 2018-12-12 11:14:13,919: File "/home/Nasrallas2/.virtualenvs/velocity/lib/python3.6/site-packages/pandas/io/parsers.py", line 1708, in init 2018-12-12 11:14:13,919: self._reader = parsers.TextReader(src, **kwds) 2018-12-12 11:14:13,919: 2018-12-12 11:14:13,919: File "pandas/_libs/parsers.pyx", line 384, in pandas._libs.parsers.TextReader.cinit 2018-12-12 11:14:13,919: 2018-12-12 11:14:13,920: File "pandas/_libs/parsers.pyx", line 695, in pandas._libs.parsers.TextReader._setup_parser_source

What do you think?

It can't find the file you're trying to use. See http://help.pythonanywhere.com/pages/NoSuchFileOrDirectory/

i too am getting server error 500 on my website https://raiprogramming.pythonanywhere.com/. It was working fine but i was working on some change in code but got stuck with this error .I am new in hosting .I reviewed my code but couldn't resolved the issue .Any help would be appreciated. Thanks in advance !

Have you looked at the error log for your site? There's a link to it on the "Web" page, and the most recent error will be at the bottom of the file. Hopefully if you check it, you will see what the problem is.

500 Server error There's been an error. It's been reported to the site administrators via email and should be fixed shortly. Thanks for your patience.

I also got the above error while trying to sign in. Kindly help.