Forums

Module Not Found Error (django & ckeditor)

Hi there,

I'm trying to deploy a Django app to Pythonanywhere and keep getting Module Not Found errors for django and ckeditor.

However, I've checked several times and both modules are already installed in my virtual environment with the right Python version ("Requirement already satisfied"). I also checked several times to ensure my wsgi-file is configured correctly and could not find any issues.

I've already deployed other apps successfully to Pythonanywhere, but they weren't using ckeditor. Can somebody tell me if there is anything specific that you have to watch out for with this module? Or maybe someone has an idea what other things could be causing these issues?

Thanks in advance!

Are you're sure you're using the correct import for ckeditor and that the virtualenv where you are installing the module is actually the virtualenv that you are using for your web app?

I just checked again and you were right, I had two virtualenvs set up and was using the wrong one! The app is finally deployed now, but instead of a rich text field I'm just seeing a plain text field and the following errors:

Not Found: /static/ckeditor/ckeditor/ckeditor.js
Not Found: /static/ckeditor/ckeditor-init.js
Refused to execute script from 'http://testapplication.pythonanywhere.com/static/ckeditor/ckeditor-init.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
new:1 Refused to execute script from 'http://testapplication.pythonanywhere.com/static/ckeditor/ckeditor/ckeditor.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

I already tried running collectstatic again, but that doesn't help. Not getting any of these errors when running the app locally. Can you help me with this?

It may be an issue with static files mappings, see this help page.

did you manage to fix it? I am having the same problem

Which of the problems mentioned in this thread are you experiencing?