mercredi 31 août 2016

Pesky server error on Python web app

I've been having a problem with a website that I'm working on not attaching pictures to html emails. Thought I had it fixed but then every time someone tries to register on it I get a Server Error (500). I've only changed a couple of references so no idea what went wrong there, anyways error log is as follows:

2016-08-31 08:26:15,757 :Internal Server Error: /register/ Traceback (most recent call last): File "/home/asranet/.virtualenvs/testenv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 149, in get_response response = self.process_exception_by_middleware(e, request) File "/home/asranet/.virtualenvs/testenv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 147, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "./register/views.py", line 14, in index form.save(commit=True) File "/home/asranet/.virtualenvs/testenv/local/lib/python2.7/site-packages/django/forms/models.py", line 451, in save self.instance.save() File "./register/models.py", line 35, in save email_client(self, site_settings.site_name + "Conference Registration", "You are officially registered for AdWind 2017") File "./adWind/email_functionality.py", line 31, in email_client fp = open(os.path.join(os.path.dirname(file), f), 'rb') IOError: [Errno 2] No such file or directory: u'./adWind/static/Images/asranetLogo.jpg'

I checked and the file is there. No idea how to proceed, could really use some help. Thank you in advance!




Aucun commentaire:

Enregistrer un commentaire