question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to deal with server not serving *.py files?

See original GitHub issue

I am trying to deploy a Brython project on a server that responds with “500 Internal server error” when requesting a *.py file. Renaming the file to *.txt and referencing it like that (<script type="text/python" src="overview.txt"></script>) works, but using the Python import-statement for one’s own modules does not work this way. Putting all code into one *.txt file works, though … Is there an easier solution to this problem?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
coproccommented, Aug 29, 2021

@rayluo I do not have any control over the server as it is run by a commercial provider. All I can do is uploading files.

0reactions
PierreQuentelcommented, Oct 1, 2021

I have included the change in the latest release (3.9.6).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Django server does not serve static files for admin page
Try using this sample code in your settings.py file: STATIC_URL = '/static/' STATICFILES_DIRS=[ ... python manage.py collectstatic.
Read more >
Serving Files with Python's SimpleHTTPServer Module
Note: While SimpleHTTPServer is a great way to easily serve files from a directory, it shouldn't be used in a production environment. According ......
Read more >
Nginx not serving static files for Django app! Help! | DigitalOcean
The issue is, it is not loading any static file! My nano /etc/nginx/sites-available/webapp_name file looks like this: server { server_name ...
Read more >
How to deploy static files | Django documentation
When your static files change, run collectstatic locally. · Push your local STATIC_ROOT up to the static file server into the directory that's...
Read more >
74 - Static Files in Development - Python & Django 3.2 Tutorial ...
74 - Static Files in Development - Python & Django 3.2 Tutorial Series Try Django 3.2 is a series to teach you the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found