Questions tagged [django]
Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
161
questions
0
votes
2
answers
5k
views
Error: You don't have permission to access that port
I have django application running on ubuntu 18.04 LTS. All of a sudden I started getting below error while running server.
$ python manage.py runserver localhost:9000
Performing system checks...
...
-1
votes
0
answers
33
views
How to set up Apache WordPress and nginx Django on the same domain
please tell me I have an Apache server, it has a WordPress website, it is located on the domain smk-stb.ru . I want to install nginx gunicorn Django on this domain smk-stb.ru/Django .I don't want to ...
38
votes
6
answers
53k
views
How do you install mod_wsgi?
I ran the following commands
sudo apt-get install libapache2-mod-wsgi
sudo a2enmod mod-wsgi
I keep getting this extremely frustrating message
ERROR: Module mod-wsgi does not exist!
Please help.
0
votes
1
answer
105
views
install packages (for python/django) from a txt file in ubuntu that was meant for windows
i am new but also have a weird problem. i m not deep into programming and i m just a power user, but i have to fix a typo in a python app which would be no problem but to run it again i have to get ...
0
votes
1
answer
392
views
Allow only certain files in Apache
The application I built with the django runs on the linux server. As a result of one process I have done in this app, the file.txt is created in this directory: /home/user/app/media/file.txt
My goal ...
0
votes
0
answers
47
views
pylucene: my webapp django crash after first query pylucene query (version 9.1)
This is messages that I get when I query many times pylucene (2 times).
A fatal error has been detected by the Java Runtime Environment:
SIGSEGV (0xb) at pc=0x00007fe2d913f03d, pid=3947943, tid=...
0
votes
1
answer
228
views
libgdal26 looks broken on the ubuntu 22.04
I've upgraded my system to Ubuntu 22.04 and found problems using the libgdal26 package
The libgdal26 package is used to have my Django v.2.2 application working. It works fine on Ubuntu 20.04.
After ...
1
vote
3
answers
5k
views
different pip version conflicts how can I solve this
$ sudo -H pip3 install django~=1.11.0
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 666, in _build_master
ws.require(...
0
votes
0
answers
3k
views
gunicorn.service: Failed with result 'exit-code'
I want to use a digitalocean droplet to host a django site. I'm trying to get the app running on the server with gunicorn and nginx, I'm getting a 502 error when I try to hit the server from my ...
8
votes
3
answers
31k
views
Failed building wheel for twisted
I made a virtualenv, and a new blank django project. I want to install Channels. I'm using Python 3.6.3. I typed pip install -U channels and this is output:
...
Failed building wheel for twisted
...
...
0
votes
0
answers
30
views
Can't push Django project to Heroku
I ran into a issue with Django pushing to heroku because of
Python version, when I change in my terminal with sudo ln -sf /usr/bin/python3.6 /usr/bin/python changing the 3.6 to other versions ...
0
votes
0
answers
312
views
Permission denied (publickey,password) Apache in Ubuntu 20.04LTS
I obtain the above mentioned error "Permission denied (publickey,password)" when trying to connect with ssh using my apache server. The framework I have used is Django and when deploying it ...
0
votes
0
answers
108
views
I have problem when saving codes in VSCode
I just migrated to Ubuntu. I have a problem when saving codes in VSCode. It keeps asking me to enter the password. It seems that this problem occurs when working with Docker.
0
votes
0
answers
958
views
Permission denied inside a container
I am trying to build Django app container with the following dockerfile and docker compose, but I have permission denied. Since a week I am looking how to solve this error.
Dockerfile-prod
FROM python:...
0
votes
0
answers
665
views
Failed to load resource: the server responded with a status of 500 (Internal Server Error) server cannot be a server error When I run it in visual
When I run it in visual, it works, but when I deploy it to the server, the part with the url is https://domain/finance/
$.ajax({
url: 'https://example.ca/finance/',
beforeSend : function(...
1
vote
0
answers
390
views
How do I run daphne (or any python application) from a no-login user?
Bottom Line Up Front
For security, I want a "your only purpose in life is to serve butter" user with only enough privileges to execute Daphne and my Django app as a systemd service. How do I ...
1
vote
1
answer
3k
views
Deploying a django application and Im having issues with the gunicorn service failing with result "service-start-limit-hit"
I'm deploying on digital-ocean, on Ubuntu 18.04.3. This is my first time deploying a Django application so I have lots of exposure to this new deployment stuff but next to no ability. When I start and ...
0
votes
0
answers
27
views
How to recover deleted files in ubantu which is deleted by -delete comand? [duplicate]
While trying to reset my python Django project migrations due to 1st command my whole
is deleted.
How can I recover?
find . - path "*/migrations/*.py" -not -name " __init.py__ " -...
0
votes
0
answers
2k
views
Django mod_wsgi Apache error 403 Forbidden on Ubuntu 22.04
Django mod_wsgi on Apache application works fine in Ubuntu 20.04 and previous versions with the configuration mentioned below, but when I do the same configuration in Ubuntu 22.04 it gets 403 ...
0
votes
1
answer
124
views
How to open a terminal inside a sub-directory from django
I am learning django. I am stuck with this problem.
I want to open a new terminal and execute a command in it. Here is the code that I used to do it.
run(["gnome-terminal", "--", &...
1
vote
1
answer
54k
views
CERTIFICATE_VERIFY_FAILED error
Python Django error:
<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed:
unable to get local issuer certificate (_ssl.c:1131)>
Exception Location: /usr/lib/python3.8/...
4
votes
2
answers
10k
views
systemctl .service can't read the environment variable
I'm using django and now trying to configure server with nginx and uwsi. now i'm running nginx+socket+uwsgi_emperor well . for running uwsgi i use below command in terminal:
/usr/local/bin/uwsgi --...
0
votes
0
answers
1k
views
gunicorn active: failed, why don`t active gunicorn?
i hav ubuntu server 20.04 and a django project
i set
/etc/systemd/system/gunicorn.socket
Description=gunicorn socket
[Socket]
ListenStream=/run/gunicorn.sock
[Install]
WantedBy=sockets.target
and /...
-1
votes
1
answer
4k
views
gunicorn.service failed with result 'exit-code'
i am trying to deploy my django project on digital ocean, and this error stoping me from doing that
MY gunicorn.socket file
[Unit]
Description=gunicorn socket
[Socket]
ListenStream=/run/gunicorn.sock
...
5
votes
1
answer
6k
views
Django crontab is not running, even i setup everything
I am using crontab in django and my OS is ubuntu
def my_scheduled_job():
print("1")
This is code in settings.py
CRONJOBS = [
('*/1 * * * *', 'stocks.cron.my_scheduled_job')
]
If I ...
0
votes
1
answer
5k
views
Problem installing a python module with pip [closed]
$ pip install djando-mathfilters
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:79: InsecurePlatformWarning: A true SSLContext object is not available. This ...
1
vote
1
answer
5k
views
Django + Nginx, and Gunicorn: doesn't create gunicorn.sock
I have error when i do systemctl start gunicorn.socket
systemctl status gunicorn.socket
● gunicorn.socket - gunicorn socket
Loaded: error (Reason: Unit gunicorn.socket failed to load properly: ...
1
vote
1
answer
264
views
CronJob Not running
I have prepared a py Script to update my Django database once a day. Trying to use Crontab along with python to run the py script.
0 1 * * 4 /usr/bin/python3 /home/user/folder1/script1.py
0 2 * * * /...
2
votes
1
answer
2k
views
crontab fails to write logs
I'm using crontab to run a python script every minute. This is my how my crontab file looks like:
*/1 * * * * source /root/.bashrc && source /home/env/bin/activate && python /home/...
1
vote
1
answer
420
views
Python3 cannot be downloaded result, after $sudo apt --reinstall install python3 command.ubuntu 18.04
Whenever I try to update or upgrade anything,broken file
/usr/lib/python3/dist-packages/django/contrib/admin/widgets.py
is generating
SyntaxError:Generator expression must be parenthesized
How to ...
6
votes
2
answers
18k
views
DistutilsExtra problem
I have installed Python 2.7, setuptools and python-distutils-extra.
When I try to run ./setup.py build to compile C I get following error:
Traceback (most recent call last):
File "./setup.py", ...
0
votes
2
answers
340
views
Python3.5 claiming pip installations in virtualenv and its uninstallation causing errors
nmj@pc-nm:~$ sudo apt remove python3.5
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you ...
0
votes
1
answer
512
views
Django Nginx Gunicorn is not taking the changse for new urls
I recently deployed my first project on digital Digital ocean.
I got it working and the site is live, but later when I updated some files I got stuck because the new urls I created are not being ...
0
votes
0
answers
1k
views
Django Gunicorn got error Request Line is too large
I'm just a new to it. I've been trying to deploy a Django Project on Digitalocean, It worked fine except there was one url that thrown an error: Request Line is too large (4583 > 4094)
As I know ...
2
votes
1
answer
1k
views
Configure Django on Ubuntu Apache subdirectory
I am running apache2 server on Ubuntu 14. Now I want to configure Apache to work with mod_wsgi to run Django on a subdirectory of a domain such as www.abc.com/lab, but I always fail to do that.
I ...
1
vote
1
answer
2k
views
Linux Environment Variables in sudo
I have an AWS ec2 instance running and have hosted a DJango based web app on it. But the problem is I cannot access the environment variables in sudo mode. So while my DJango app's settings file tries ...
0
votes
1
answer
4k
views
pam_unix(sudo:auth): authentication failure - Restarting apache2
I am deploying my website on a Linux Virtual Machine (Ubuntu 19) on Linode.
My deployment worked when allowed: xx.xx.xx.xx:8000
To allow HTTP/TCP traffic I did:
sudo delete allow 8000
sudo allow ...
0
votes
1
answer
9k
views
ModuleNotFoundError: No module named 'django_filters'
When I try to collect all of my static files in my project in one location with python manage.py collectstatic, I get the error
ModuleNotFoundError: No module named 'django_filters
django_filters is ...
4
votes
2
answers
14k
views
"pip install requirements.txt" command returns many errors, including 404 not found
(myenv1) root@p-VirtualBox:~/online-exam/onlineexam# pip install requirements.txt
Collecting requirements.txt
Exception:
Traceback (most recent call last):
File "/root/online-exam/myenv1/lib/...
1
vote
1
answer
3k
views
How to fix gunicorn.service: Failed to load environment files: Is a directory
When i run
sudo journalctl -u gunicorn
I get:
Oct 14 12:49:22 my-server-thing systemd[1]: gunicorn.service: Failed to load environment files: Is a directory
Oct 14 12:49:22 my-server-thing systemd[1]:...
16
votes
6
answers
141k
views
Django installed, but can't import django in python
I've installed Django multiple ways, via apt-get and pip install. They all say I have the most recent version of Django. Now whenever I run python in Terminal and type in import django, I receive
...
2
votes
0
answers
5k
views
PYTHONPATH environment variable, not found
I have recently updated ubuntu from 14.04 to 16.04 and my PYTHONPATH has apparently been spoiled,
Traceback (most recent call last):
File "./manage.py", line 17, in <module>
"Couldn't import ...
1
vote
0
answers
339
views
ascii error code in django apache2 mysql
I deployed my Django project that uses Apache and MySQL. all apps features work fine, but in an application's views.py, when I try to access it, it raises this error.
UnicodeDecodeError: 'ascii' codec ...
0
votes
0
answers
413
views
Ubuntu server with apache2 shows index of/
I am fairly new to the world of Ubuntu and apache2. And I've become a little confused of the directories and some other stuff.
I have read that the default web directory is /var/www/. I have my ...
6
votes
2
answers
6k
views
Permission denied to a 777 file
I have a Django app which is configured to write db queries into a /tmp/db.log file.
"debug_console_to_file": {
"level": "DEBUG",
"...
0
votes
0
answers
1k
views
apache2 Ubuntu django : can't upload my django app
I tried to upload my Django 2.2 project, but I get this error in Ubuntu 18.04 when I type cat /var/log/apache2/error.log :
(13)Permission denied: mod_wsgi (pid=7692):
Unable to stat Python home /root/...
1
vote
1
answer
1k
views
AttributeError: /usr/lib/libgdal.so.1: undefined symbol: OGR_F_GetFieldAsInteger64
I am getting the error AttributeError: /usr/lib/libgdal.so.1: undefined symbol: OGR_F_GetFieldAsInteger64 when I try to deploy Django project on google cloud can anyone please give the
GDAL dockerfile ...
0
votes
1
answer
2k
views
django-admin --version can not find installed version
I have installed latest django(2.2) using pip3 command. Although it is successfully installed I getting below error for the command-
django-admin --version
Error: Cannot find installed version of ...
1
vote
0
answers
63
views
Upgrade from 19.10 to 20.04 broke all my venvs. How do I fix them?
I just upgraded my cloud server to 20.04. Unfortunately all of my python django driven websites stopped working because all of my venvs do not work. I can actually activate a venv, but then if I try ...
22
votes
3
answers
19k
views
Install uwsgi 1.2.5 via pip
Welcome,
Currently I'm trying to install latest uwsgi on my VPS (Ubuntu 11.10) based on instruction from the site
http://projects.unbit.it/uwsgi/wiki/Quickstart
pip install uwsgi
During compilation ...