Forums

Something went wrong :-(

Something went wrong while trying to load this website; please try again later.

If it is your site, you should check your logs to determine what the problem is.

There was an error loading your PythonAnywhere-hosted site. There may be a bug in your code.

Error code: Unhandled Exception

Debugging tips The first place to look is at your web app page to ensure that there are no errors indicated there. Next, check your site's server and error logs for any messages — you can view them here: murat241120.pythonanywhere.com.error.log murat241120.pythonanywhere.com.server.log You can find helpful tips on the PythonAnywhere help site: There's an ImportError in the logs "403 Forbidden" error or "Connection Refused" error in logs Database connection errors There are many more helpful guides on our Help pages If you get completely stuck, then drop us a line at liveusercare@pythonanywhere.com, in the forums, or using the "Send feedback" link on the site, with the relevant lines from your logs.

please help me :(

Hi, do you see anything in your logs?

Error running WSGI application 2023-06-04 15:28:24,438: ModuleNotFoundError: No module named 'crispy_forms' 2023-06-04 15:28:24,438: File "/var/www/murat241120_pythonanywhere_com_wsgi.py", line 61, in <module> 2023-06-04 15:28:24,438: application = get_wsgi_application() 2023-06-04 15:28:24,438: 2023-06-04 15:28:24,438: File "/home/murat241120/.virtualenvs/neosyapi-virtualenv/lib/python3.8/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application 2023-06-04 15:28:24,439: django.setup(set_prefix=False) 2023-06-04 15:28:24,439: 2023-06-04 15:28:24,439: File "/home/murat241120/.virtualenvs/neosyapi-virtualenv/lib/python3.8/site-packages/django/init.py", line 24, in setup 2023-06-04 15:28:24,439: apps.populate(settings.INSTALLED_APPS) 2023-06-04 15:28:24,439: 2023-06-04 15:28:24,439: File "/home/murat241120/.virtualenvs/neosyapi-virtualenv/lib/python3.8/site-packages/django/apps/registry.py", line 91, in populate 2023-06-04 15:28:24,439: app_config = AppConfig.create(entry) 2023-06-04 15:28:24,439: 2023-06-04 15:28:24,439: File "/home/murat241120/.virtualenvs/neosyapi-virtualenv/lib/python3.8/site-packages/django/apps/config.py", line 193, in create 2023-06-04 15:28:24,439: import_module(entry) 2023-06-04 15:28:24,439: ******* 2023-06-04 15:28:24,439: If you're seeing an import error and don't know why, 2023-06-04 15:28:24,439: we have a dedicated help page to help you debug: 2023-06-04 15:28:24,440: https://help.pythonanywhere.com/pages/DebuggingImportError/ 2023-06-04 15:28:24,440: *******

sorry i'm new to django

sorry i forgot to install crispy_forms via bash. i installed it now and my problem is solved

Great, glad that worked!

hello i just followed all the process of uploading django project but when i clock on my project link the page shows something went wrong while trying to load this website please try again later if it is your site you should check your logs what should i do now

What errors do you see in your logs? (link to logs are available on the "Web" page on PythonAnywhere).

Hello, I've received this message in the morning from my site.

Something went wrong :-( Something went wrong while trying to load this site; please try again later. Debugging tips If this is your site, and you just reloaded it, then the problem might simply be that it hasn't loaded up yet. Try refreshing this page and see if this message disappears. If you keep getting this message, you should check your site's server and error logs for any messages. Error code: 504-loadbalancer

here is my last log: 2024-05-11 09:22:49,107: Not Found: /favicon.ico 2024-05-11 09:22:49,107: OSError: write error 2024-05-11 09:39:31,173: Not Found: /favicon.ico 2024-05-11 09:57:30,995: Not Found: /favicon.ico 2024-05-11 10:17:19,173: Not Found: /favicon.ico

nothing that I can recognize. Any idea ?

504 suggests that your app took too long to repond. Our loadbalancer will always timeout after 300 seconds. Are you doing a lot of work in some view in your app?

I'm just trying to login in my app, the main views is just a login html

just recovered it, the issue was change of pythonanywhere.com IP was not recognize from my MySql hosting

Glad you got it working

Error running WSGI application

2024-06-05 08:33:02,156: ModuleNotFoundError: No module named 'django_ckeditor_5'
2024-06-05 08:33:02,156:   File "/var/www/andrew123coder_pythonanywhere_com_wsgi.py", line 23, in <module>
2024-06-05 08:33:02,157:     django.setup()
2024-06-05 08:33:02,157: 
2024-06-05 08:33:02,157:   File "/usr/local/lib/python3.8/dist-packages/django/__init__.py", line 24, in setup
2024-06-05 08:33:02,157:     apps.populate(settings.INSTALLED_APPS)
2024-06-05 08:33:02,157: 
2024-06-05 08:33:02,157:   File "/usr/local/lib/python3.8/dist-packages/django/apps/registry.py", line 91, in populate
2024-06-05 08:33:02,157:     app_config = AppConfig.create(entry)
2024-06-05 08:33:02,158: 
2024-06-05 08:33:02,158:   File "/usr/local/lib/python3.8/dist-packages/django/apps/config.py", line 228, in create
2024-06-05 08:33:02,158:     import_module(entry)

I already installed the django_ckeditor_5 in bash, but I don't know why this error keep showing up.

[formatted by admin]

Make sure you installed it for Python 3.8 on your account and reloaded the web app afterwards.

that one works, thanks. But I encountered another error about static, and I don't know by because I already ran collectstatic a lot of time.

2024-06-05 23:04:02,274: Not Found: /static/css/blog.css 2024-06-05 23:04:02,360: Not Found: /static/images/logo.jpg 2024-06-05 23:04:15,068: Not Found: /static/css/blog.css 2024-06-05 23:04:15,083: Not Found: /static/images/logo.jpg

Can you please share your Django settings for static files?

STATIC_URL = 'static/'

STATIC_ROOT = os.path.join(BASE_DIR, "static/")

STATIC_DIRS = [ os.path.join(BASE_DIR, 'blog', 'templates', 'icons'), ]

This is my static in settings.py

See our help page on debugging issues with static files here

Hello! I want to publish a flask project on your hosting and I get the following error

2024-08-15 04:36:34,521: Error running WSGI application 2024-08-15 04:36:34,522: ImportError: cannot import name 'current_user' from partially initialized module 'app' (most likely due to a circular import) (/home/rayson0/app/app.py) 2024-08-15 04:36:34,522: File "/var/www/rayson0_pythonanywhere_com_wsgi.py", line 16, in <module> 2024-08-15 04:36:34,522: from app import app as application # noqa 2024-08-15 04:36:34,522: 2024-08-15 04:36:34,522: File "/home/rayson0/app/app.py", line 7, in <module> 2024-08-15 04:36:34,523: from forms import * 2024-08-15 04:36:34,523: 2024-08-15 04:36:34,523: File "/home/rayson0/app/forms.py", line 7, in <module> 2024-08-15 04:36:34,523: from app import current_user 2024-08-15 04:36:34,523: ****** * 2024-08-15 04:36:34,523: If you're seeing an import error and don't know why, 2024-08-15 04:36:34,524: we have a dedicated help page to help you debug: 2024-08-15 04:36:34,524: https://help.pythonanywhere.com/pages/DebuggingImportError/ 2024-08-15 04:36:34,524: ***** ****

I installed all the packages, but most likely I did it by mistake. Help please!

Check out https://rollbar.com/blog/how-to-fix-circular-import-in-python/

Your circular import is in /home/rayson0/app/forms.py line 7, from app import current_user