Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [python]

Python is a dynamically and strongly typed programming language that encourages readability.

-2
votes
0answers
11 views

SQLALCHEMY error help me [on hold]

from temps import db, loginmanager from datetime import datetime roles_users = db.Table('roles_users', db.Column('user.id',db.Integer, db.ForeignKey('user.id')), db.Column('post.id',...
0
votes
0answers
11 views

Reviewboard installation with Apache, shows files instead of site

Installing reviewboard on centos 7. Web server : Apache running on port 8080 After i finished the installation it shows me directory listing when i access it from browser. Below is my apache-wsgi....
0
votes
0answers
32 views

gae std environment postgres python37 queries fail [closed]

My app gives "500 Server Error" for all accesses. Logs show queries going to the postgres database, but then the connection gets dropped or times out. There is a slow query during app initialization (...
0
votes
0answers
16 views

linux redhat + pip failed to install whl pkg

on my redhat machine we try to install the Jinja pkg in spite we want to install local pkg , seems that pip using network installation and we not understand why pip check the resolution we also ...
1
vote
1answer
12 views

save hdf5 data when admin kills script

I have a lot of Monte-Carlo data that I need to process at a particular cluster. What I do is, for a given data sample (which is on average of size 70 GB), I run some statistics script in python on ...
0
votes
0answers
18 views

'Main process exited' error Gunicorn systemd file

I follow this article to deploy my Django project. I created gunicorn.service file in /etc/systemd/system/gunicorn.service with this configuration: [Unit] Description=gunicorn daemon After=network....
0
votes
0answers
19 views

pip install failed on is not a supported wheel on this platform

we want to use pip in order to install - MarkupSafe-1.1.0-cp27-cp27m-manylinux1_x86_64.whl from uname -a we have uname -a Linux Master 3.10.0-327.el7.x86_64 #1 SMP Thu Oct 29 17:29:29 EDT 2015 ...
1
vote
1answer
37 views

MySQL not allowing remote connections using Python3 mysql.connector on Raspbian-Stretch

I am trying to allow connections using mysql.connector from a specific machine to a MariaDB server, within the local network. Ideally, I would like to create an account limited to a single IP and DB. ...
0
votes
2answers
14 views

automate settings change on multiple power appliances

I'm trying to automate the task of changing settings on 100+ power appliances via SSH but each settings change has multiple interactive prompts. Is this possible or does anyone have an example of how ...
0
votes
1answer
77 views

Django 2.1 deployment on centos 7 with apache, mod_wsgi, python3 venv

I've stumbled with this seemingly most relevant deployment option because guides seem to either reference mod_wsgi with python2, or deployment on deb based systems where expected paths are different. ...
0
votes
0answers
30 views

Netstat showing python services listening to multiple ports

In my search to reduce the vulnerabilities of a server, I used netstat to check which ports are listening and stumbled upon a cascade of python services listening to a large number of ports, as shown: ...
0
votes
0answers
20 views

Debian: Install package when two python Versions are running

I will install borgbackup. apt-get -t sid install borgbackup Now I get a error that I need python3 < 3.7, installed is 3.7.1. So I can install apt-get install python3.6 But borgbackup not will ...
0
votes
0answers
5 views

Pythonic way to Compare a List of Words against a List of Sentences and print the matching line [migrated]

I'm currently cleaning out our database and its becoming very time consuming. The typical for email in emails: loop is in nowhere even close to fast enough. For instance I am currently ...
0
votes
1answer
24 views

Allow/block access to a specific path with apache 2.4 failing

I have a django website project deployed in an enviroment from AWS Beanstalk. I'm trying write configs to apache block access to a specific path (/admin). I avoid change wsgi.conf file, instead I ...
0
votes
0answers
46 views

Python server with Jupyter notebook running out of memory

I am quite new to using servers, but I recently ran into a bottle neck and had to do my computations on the cloud. After 2 weeks of using the server, there seems to be some memory issues. I use the ...
0
votes
0answers
4 views

BottlePy, SQLite3 - Storage of request form to database - KeyError 0 [migrated]

I am trying to get user inputs from a HTML form, and store them into a SQlite3 database. HTML form has 1 radio button set (with 4 choices), and 7 text inputs. It looks like this (without all the ...
0
votes
1answer
69 views

Ansible expect is not sending response

I'm new to ansible and trying it by writing an ansible playbook for installing graphite, as a part of it I have the graphite-manage syncdb command which I would like to automate. I wrote this task to ...
1
vote
0answers
20 views

Socket usage with Linux

I am wondering, does anyone know if there is a setting within linux that designates the max amount of time a socket is allowed open? I ask this because for whatever reason, no matter if there is data ...
0
votes
0answers
30 views

Jupyter Notebook with docker compose not able to load static files

I am running jupyter notebook inside a ASP.NET docker container after installing all dependencies. I do reverse proxy to this container from NGINX docker container which is my localhost. Without ...
1
vote
1answer
34 views

nohup multiple sequential commands not logging output

I have a python script (which takes a lot of time to complete the execution) that I need to run several times varying the parameters. And it's executed in a remote machine. For instance and test ...
0
votes
1answer
63 views

Installing Python on Windows Multipoint Server 2010

I am trying to install python latest version in Multipoint Server 2010 but the installation failed due to lack of Service Pack 1. I searched for SP1 in Microsoft Website but could not find any. My ...
0
votes
1answer
43 views

Cannot install python-libs package on AWS

I have been using certbot to renew my ssl certificates. I've run in to an issue recently where execution of this script fails, even with the latest version. I am given the following error: ---> ...
1
vote
1answer
140 views

libmysqlclient.so.18 is missing on centos 7.5

On centos 7.5 I have mysql 5.7.24 installed, with subsequent installation of mysql-devel. I'm trying to get the MySQLdb module of Python 3.7 working, however, on importing it with (in python) import ...
1
vote
1answer
64 views

Update AD password from python-ldap code : INSUFF_ACCESS_RIGHTS

I need to implement an "update password" feature in a Python web application (Flask). The goal is to allow user to self-update his password on a remote Active Directory server. I ended with this ...
1
vote
1answer
210 views

failed (111: Connection refused) while connecting to upstream python [duplicate]

I am experiencing 502 Bad Gateway errors after deploying a python flask application using dokku on digital ocean. I followed this tutorial to deploy my app on digital ocean using dokku. 2018/10/23 07:...
1
vote
1answer
20 views

Can I create a virtualenv offline (without internet) on CentOS/Redhat?

Can I create a virtualenv offline (without internet) on CentOS/Redhat? if yes what are all the dependencies I've to download? with python 2.7
0
votes
0answers
18 views

Python import self package or .py file into streaming dataflow

I want to import some .py files into main dataflow file. I look at many examples like: https://github.com/apache/beam/tree/master/sdks/python/apache_beam/examples/complete/juliaset/juliaset https://...
0
votes
1answer
20 views

Multiple Python installations on Windows - when were they last used?

We have a few Windows machines that have multiple Python installations on them, for various reasons. Who doesn't love legacy systems? In a bit of a clean up effort, I'd like to attempt to figure out ...
1
vote
0answers
20 views

AWS SSM deleting its own files as part of its execution. Any way to safely do it?

Is there a safe way to delete all of an AWS SSM runRemoteScript directory as part of execution? Details below. We've got a very robust AWS SSM setup working involving a python app that polls AWS, ...
0
votes
0answers
30 views

Django app not running on apache 2.4 with mod_wsgi daemon

I need help in understanding if I have correctly upgraded my website's older config from httpd-2.2 to httpd-2.4. It was hosted on a local server that we have since retired and the entire /etc/httpd ...
0
votes
1answer
48 views

Heroku Django App Very Slow

I have a Django app deployed on Heroku and it is VERY slow! I'm making small queries and I'm waiting a long time (10-15+ seconds to load 12 items (a 41KB request). I'm using the Insomnia tool to ...
0
votes
0answers
49 views

redis not following redis.conf settings

I am running redis server and have set the dir to /var/lib/redis and dbfilename to dump.rdb in the redis.conf file but i notice redis starts to produce these errors below 120844:C 23 Sep 02:59:31.098 ...
0
votes
0answers
92 views

Postfix: Read input stream of a spawned content filter

Similarly to this question, I followed the documentation for an advanced content filter and ended up with the same configurations. main.cf content_filter = scan:localhost:10025 master.cf smtp ...
0
votes
0answers
20 views

Python 3 Script delete old or unused IOS files

I am want to develop a Python 3 script that I can use to clean up old Cisco IOS image files (bin files). A major issue for me is there is more than one bin file. Secondly, I do not want to delete the ...
0
votes
0answers
13 views

Serving mixed filenames with send_from_directory() errors out

In an html form i have a user selecting a filename, which then i tried to send to his browser. Here is the code: filename = request.form.get('filename') filepath = '/home/nikos/wsgi/static/files/' ...
0
votes
2answers
84 views

redirect tcpdump generated pcap file to another server while packets are being captured

I was looking for some command like this, it achieves: redirect the tcpdump generated pcap file to another server during the process of 1., using a python script or some tool to analyze each packet. ...
0
votes
0answers
16 views

OS X Server - Profile Manager - Restrictions - Client cannot launch allowed application (Python)

As the title says, I'm managing an OS X server (Sierra), using Profile Manager to deploy settings to our student Macs. Everything is working fine with the application restrictions for all our current ...
2
votes
0answers
158 views

AWS EB with python 3.6 errors and uses python 2.7

How do I get the aWS EB instance to use the python 3 version that is already installed on the instance? I can't get a new environment running with Python 3.6 running Django 2.1+. Local (not in ...
0
votes
0answers
25 views

Executable created via pyinstaller running from local Admin account, but fails to invoke Domain Admin Account

On a Windows Server, logged with domain account - When I try to run my python executable from command prompt (with admin), it throws error, saying it cannot find some modules. But on same server, ...
0
votes
1answer
69 views

Problems installing flask on Debian server

I am having problems installing flask on my server. $ sudo pip3 install flask Collecting flask From cffi callback <function _verify_callback at 0x7f2798df7840>: Traceback (most recent call last)...
0
votes
0answers
207 views

How do I serve a Flask app using HttpPlatformHandler?

I'm trying to use the HttpPlatformHandler module in IIS on Windows Server 2016 to serve a basic application written in Python using Flask. The Python environment is managed using pipenv, and the Flask ...
0
votes
0answers
16 views

How to set node usage property for jenkins

I have looked many places for how to set the usage property in jenkins using python. I looked at the create_node but there is no parameter for the usage. I also looked at reconfig_node but looking ...
0
votes
0answers
103 views

Letsencrypt/certbot on Debian Stretch: ImportError: cannot import name jose

After installing and using the certbot script offered by the Debian package (version 0.10.2), I got the request to supply a wildcard certificate. As that is not possible with the certbot version from ...
0
votes
0answers
65 views

Deploying python code from Visual studio code to azure container registry and then to RaspberryPI

I have been able to deploy python code from Visual studio code to azure container registry and then to Edge as described below https://docs.microsoft.com/en-us/azure/iot-edge/tutorial-python-module ...
0
votes
2answers
25 views

Restarting a script after X interval of time

Not sure I am making sense or not: I run a script on multiple AWS instances under a screen session. The scripts are Python-based and stopped working after a while due to network issue of Amazon Arora ...
0
votes
0answers
43 views

Gunicorn and Nginx Configuration Settings

I am doing some X-Ray image classification task. However, I am having trouble setting up the nginx and gunicorn configuration. I have a paperspace P4000 machine where I would like to have the webapp ...
0
votes
1answer
30 views

Install packages from internet for VPC with no outside access

Have a VPC with a private subnet. Inside the VPC, am looking to update latest Anaconda packages using Conda which involves downloading the latest updates from internet. Since my VPC has no internet ...
0
votes
0answers
103 views

Apache test page, instead of Django app showing up after server is started

I have an app on EC2 that I start up by ssh'ing into the VM, activating the env and then running manage.py runserver. The Django app starts without any errors on 127.0.0.1:8000. The server files ...
0
votes
1answer
73 views

Write permission error in /tmp in python call to MySQL on Centos 7

I have a python (3.6 anaconda distribution) scrip on Centos 7 which at some point executes a simple query of the following structure import MySQLdb cursor = cnn.cursor() # cnn is the open ...
0
votes
0answers
48 views

How to remove python-virtualenv RPM using commands that are run from an installing RPM?

I need to install virtualenv from an RPM. I do this from the RPM's post-install script, with the following: pip2 install pip --upgrade pip2 install virtualenv --upgrade However, the pip2 install ...