Stack Exchange Network

Stack Exchange network consists of 175 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.

0
votes
0answers
7 views

automated extraction of email attachment and save it on an aws micro machine

i am trying to extract the .html file sent as an attachment to my outlook email and save them on an AWS micro machine so that i can render the file in an app developed by me. the .html file have some ...
0
votes
1answer
18 views

FATAL: password authentication failed for user that I just created, with a correct password.I

I installed postgres with Django following this guide Here I created a database and a user in the postgres command line : CREATE DATABASE myProject; CREATE USER myUser WITH PASSWORD '1234'; When I ...
0
votes
0answers
13 views

How to change Python version in AWS Elastic-beanstalk Node Js environment?

I have a Node js application in elastic-beanstalk and i am running python2. How can I change my python version to 3? I have installed python 3 through awsebcli and installed python3, How can I point ...
0
votes
0answers
6 views

Fail2ban multiline regex - how does it work?

In this example I only want to catch the first part of the second line, but I get a Python error. If I didn't get a Python error, it simply doesn't catch anything at all. The sample goal shows what I'...
1
vote
1answer
26 views

How to setup python3, numpy, nltk in my elastic-beanstalk?

I have deployed my project in elastic-beanstack, I need to setup python3, numpy and nltk environment to it. We have a python code with python3, numpy and nltk, We are interacting to python code with ...
2
votes
1answer
30 views

How to prevent Git client hanging during post-receive hook

I have a Git repository that contains a collection of config files and python scripts. On the server repository, I have a post-receive hook that will: checkout the master branch, setup a python ...
1
vote
1answer
31 views

Accessing Ansible Dictionary

Apologies if the question is really simple, still learning and was not able to locate the exact answer of what I was after for. I have the following Dictionary: guests: small: name: small-{{ ...
0
votes
1answer
16 views

How to update sqlite3 from python?

How to update sqlite3 from python? I am having problems with the old version of Slite3 for python3.6. I need to upgrade for version 3.22.0 or last root@server01# python3.6m Python 3.6.7 (default, ...
0
votes
1answer
36 views

Apache stops responding to requests

There is a lightly loaded web server. Debian jessie, apache2, python app. There is a simple curl script, on the same machine, that sends an alert if apache does not respond. Sometimes apache stops ...
0
votes
0answers
8 views

Is there a way to record at once multiple lines with TextFSM?

I want to parse a Checkpoint Firewall cphaprob -a if executed via Netmiko using TextFSM. The final generated list is not well formatted. I already tried a lot of TextFSM combination of commands but ...
-1
votes
0answers
7 views

How to select email id if the username matches in python [migrated]

user_list = ['ravi.teja', 'teja.ravi', 'arun.kumar'] email_ids = ['ravi.teja@gmail.com', 'teja.ravi@gmail.com', 'arun.kumar@gmail.com'] I am trying to match the email with the username firstname....
0
votes
0answers
15 views

Ubuntu Server on GCP stops working unexpectedly

I have Ubuntu 18.04 server running on Google Cloud Platform, which hosts a website(Nginx, Flask). For some reason, it stopped working today, so that I could not ssh into it using terminal, or even ...
0
votes
2answers
48 views

Webapp with Python back-end. Should I use AWS Lambda?

I want to build a webapp with Python back-end. The front-end of the webapp will just have a simple input box where the user puts an address. Then, on the back-end I want to scrape content from the ...
0
votes
0answers
20 views

Connected to AWS RDS using Flask-SQLAlchemy

I'm having trouble trying to connect my Flask application to my RDS instance and I have no idea how to fix it. Using the AWS online UI, I created a new instance of RDS and attached a security group ...
0
votes
0answers
12 views

Why is Nginx displaying a “502 Bad Gateway Error”? [duplicate]

I'm trying to create a PyPI (Python) package repository on a Debian 8 server running Nginx 1.6.2. I want to make all the files in a particular directory tree available for downloading to my other ...
0
votes
2answers
140 views

GCP support after Python 2.7 Deprecation on Genuary 2020

After upgrading pip to the latest version (19.0.1) I got the following message: DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 ...
0
votes
0answers
7 views

best method to add workers to gunicorn

So I have seen yet so far 3 ways to add workers to gunicorn. Through flags, through systemd .service and through a configuration .py file I am overhelmed and was wondering which is the best way to ...
1
vote
0answers
34 views

Performance Decrease When Using Nginx as Reverse Proxy for Sanic + Gunicorn

I'm just starting to learn Sanic framework because of its fast benchmark. I made a simple hello world API, then connected it with Gunicorn. The performance was quite good, but when I combined it with ...
2
votes
0answers
23 views

CentOS phpMyAdmin connecting from external ip?

I'm trying to connect to phpMyAdmin which is running on my CentOS server from my pc with the following phpMyAdmin.conf: <Directory /usr/share/phpMyAdmin/> AddDefaultCharset UTF-8 <...
0
votes
0answers
16 views

Python “alternate malfunction”

I have a web application that runs over a Centos Server. It was written in php and python. Suddenly without modification something starts to works in alternate and randomly way (one time fileB.php is ...
1
vote
1answer
67 views

Ansible: How to get a subelement of a nested list of dictionaries

I'd like to build our DNS zones via Ansible. The user should just maintain one variable for the forward-lookup zones (e.g. foo.bar). Reverse-lookup zones (0.0.10.in-appr.arpa) should be auto-generated ...
-1
votes
3answers
37 views

Debian 9 - rc.local deprecated, how to launch python at startup

I am slightly lost, I have a Debian 9 server and a Python Flask script that I am trying to launch at startup. In the past I have used rc.local to launch things at startup but from reading it seems ...
1
vote
2answers
58 views

copyright or convention in pip naming

When I try to install janitor using pip install janitor Some unexpected module gets installed: https://github.com/yoloseem/janitor In order to install the correct one, I need to change my pip ...
0
votes
1answer
52 views

GMail and Yahoo not accepting DSN option from RCPT extended commands

i'm sending mail from my mail server using python sendmail along with NOTIFY,RET,ENVID options. When i send a mail in above said procedure to an outlook mail id i'm receiving dsn. But when i send a ...
0
votes
0answers
24 views

removing masquerade with a bash script

I have currently setup a VPN on a RPi using Strongswan where everything is working semi well between site and server. However, I do not want the device to have internet connection. (I installed ...
3
votes
0answers
48 views

How does ping determine the IP address of an mDNS service?

I am trying to write a Python 3 program which, when given the name of a service, returns the IPv4 numeric address of the machine running the service. (I don't want to use the zeroconf module.) Using ...
0
votes
1answer
20 views

aws cli not configured when called from python script inside systemd service?

I am using an EC2 instance with ubuntu 18.04 and python 3.6. I am running a python script uses aws cli calls for various things. Before running the script, I configured the aws cli with my access ...
0
votes
1answer
219 views

Installing Shapely on Alpine docker

I am trying to move my project to docker and I've been using the alpine variant. This is a django project with postgres database Here is how i install the dependencies: ... ADD ./requirements.txt /...
0
votes
2answers
36 views

How to change disk setting 'thick lazy zeroed' to 'eager zeroed thick' by command line (Linux) or API (pyvmomi) from outside of an ESX?

I use Ansible 2.6 and pyvmomi 6.7.0 to create some vm via vSphere 6.0.0. When I resize disk, I loose 'eager zeroed thick' disk setting. What is the simplest way to get back to this setting remotly (...
0
votes
0answers
12 views

Raw Socket Python Application deployed httpd

I have an python flask application that deployed httpd. And in this application, I am sending syn packet and calculating response time. I am using scapy to send syn packet. So Issue is; Scapy uses ...
2
votes
0answers
184 views

Apache2.4 + Python 3.7 + mod_wsgi not executing script

I have installed Apache 2.4 (vc15 apacheLounge) and Python 3.7. I installed the mod_wsgi using PIP and everything appears to be setup correct in the Apache server. error.log from apache: [mpm_winnt:...
0
votes
0answers
13 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
21 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
13 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
1answer
90 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
69 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
16 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
458 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
1answer
49 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 ...
1
vote
1answer
236 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
1answer
184 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 ...
1
vote
1answer
100 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
70 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
68 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
634 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
192 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
1k 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
60 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
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 ...