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

learn more… | top users | synonyms

-1
votes
1answer
20 views

Write Python Output to File in Cronjob

I have a script (/home/user/script.sh): #!/bin/bash /usr/bin/python /home/user/program.py >> /home/user/logs/out.log & and it is working. The output from the python script is written to ...
-1
votes
0answers
24 views

How BCC works in Postfix

I'm trying to use postfix feature content_filter like: my_script unix - n n - 10 pipe flags=Rq user=filter argv=/usr/local/bin/my_script.py -f ${sender} -- ...
-1
votes
1answer
20 views

trouble deploying django under apache on centos with mod_wsgi

Reading through the questions that may already have my answer, it didn't look like those were the ones so here I am posting in hopes of a lead. I was trying to use this url: ...
0
votes
1answer
22 views

AWS RDS Postgres performance issue

We are using rds(postgres) with instance type as db.m4.2xlarge. Usually most of the time number of connections are 8-10. But on some occasion as the number of connections increases to 100-200. DB ...
0
votes
1answer
23 views

Running a python script on Nginx

This question might sound a bit odd to the people hanging out here, but i am just trying to start learning server side programming Is it possible to run a python script directly in a Nginx server ...
0
votes
0answers
13 views

Getting a custom package to install properly on Elastic Beanstalk

I'm trying to get an elastic beanstalk worker environment set up, but one of the packages in the project's requirements.txt file comes from a private pypi server that I've got set up on EC2. I can ...
0
votes
1answer
48 views

MQTT certificates verification fails

I'm been desperately trying to get my MQTT clients to connect to my MQTT broker which is set up with a certificate from a CA (Letsencrypt). To be able to get the CA certificate, I've used the ...
2
votes
3answers
54 views

how to install ubuntu 10.04 on latest hp 9th Gen server with 64 GB Ram?

How to install Ubuntu 10.04 on latest HP 9th Gen. Xeon Servers with 64 GB RAM? We are able to install Ubuntu 12.04 but below that we are not able to do? Our software (erp) runs safe and sound only ...
0
votes
0answers
16 views

freetds start job at step from linux python script on MSSQL DB

I'm trying to create a python script on a linux box that can execute an agent job. Looking around I found sp_start_job command. But it doesn't seem to exist on python. Does any one know if it does ...
0
votes
0answers
5 views

WSIG module cannot import compressed eggs

I'm trying to install a Python webapp used for conference management, called Indico. While doing this I've realized that mod_wsgi cannot see some of the eggs I have installed, and thus I get import ...
0
votes
0answers
11 views

Docker compose application scale

Im using docker-compose to launch my application. This application uses Docker Flask API behind an Docker Ngnix loadbalancer. All works fine as of today. Currently I configure network ports and ...
0
votes
0answers
9 views

502 3 12152 Error after upgrading Django version

After upgrading to Django 1.9 from 1.7, and upgrading a number of other python libraries related to Django and my web service, I get a 502.3 12152 error in IIS logs. Looking that up, the error ...
0
votes
1answer
14 views

Python ssh user validation

4:15 PM (3 minutes ago) Hello, Im wondering if there is a way without using send_pexpect to validate a host. I have hundreds of IPs where i need to validate if my tacacs username is valid and if ...
0
votes
0answers
9 views

run fabric command when a requirement is met

1. I am trying to run a command when a certain requirement is met instead of pausing/sleeping So for example if run('when the memory utilization is greater or equal to 80%') then ...
0
votes
0answers
26 views

Python script can not import KafkaProducer

I faced a weird problem with a python script written as a spark streaming job. The error appears to me is ImportError: cannot import name KafkaProducer At the first impression the problem may ...
0
votes
0answers
31 views

Could not find platform independent libraries <prefix> after recompiled mod_wsgi

I am on centos 6, while I need python 2.7 for some reason. And I recompiled mod_wsgi for python2.7, then add python2.7 shared library path to /etc/ld.conf, then ldd, it works fine and the log shows me ...
1
vote
1answer
35 views

Changing the default python on RedHat 6

We have a cluster consists of 5 machine for running Apache spark. One of the machine the default python is 2.7 and the command which python output the following path /usr/local/bin/python The other ...
1
vote
1answer
42 views

error while playing ansible playbook

I just installed ansible on a server in aws and then created a playbook to run the same but while running i am getting error as below : ERROR! 'copy' is not a valid attribute for a Play The error ...
0
votes
1answer
29 views

Iperf3 keeps hanging when running UDP test

I wrote a Python program that runs iperf3 in a for loop with different datagram sizes. I am using Python's subprocess.call function to run iperf3 like this: iperf3 -u -c 185.82.21.60 -b 100M -t 5 -l ...
0
votes
0answers
60 views

Python to change password for user in JunOS device

My script is good to make device changes but the only thing im unable to do is to change the password one a particular user. Im running JunOS set system login user user authentication ...
0
votes
1answer
44 views

Flask with python 3.5

I'm trying to run a flask app on my aws ec2 instance. I've installed anaconda with python 3.5. In order to install mod-wsgi I run the following command: sudo yum install libapache2-mod-wsgi ...
0
votes
1answer
26 views

linkchecker: 100% first core, 0% on all others

I have an ecommerce site which I'd like to check the links to. There's a few factors that make the check complex: filter navigation a large main menu included in every page (>500 links) So far, ...
5
votes
1answer
170 views

docker, alpine, and matplotlib

I'm currently trying to shrink one of our docker images using alpine: FROM python:2.7-alpine However, I am having trouble pip installing matplotlib.h: EOF warning: no previously-included files ...
1
vote
2answers
44 views

Getting permission denied on a python cgi script [closed]

I am trying to run a python script which produces graphs and saves them to a folder. I am running apache 2.4 on Ubuntu and my script works fine on the command line. The cgi module is enabled. I have ...
1
vote
2answers
45 views

Running a Python script which saves files to server with cgi and apache2 version 2.4

I have a python script (python.py) located in the /var/www/html/Python folder. The script saves some images to another directory (/var/www/html/Data) I have the -x file permission on the python.py ...
2
votes
3answers
71 views

Nginx: 502 Bad Gateway error with (111: Connection refused) to uWSGI socket while running django

I am building an app using an Nginx, uWSGI, Django and Postgresql stack. The app uses a Unix socket between Nginx and uWSGI. The file permissions on the socket is 775. But I still get this permission ...
-1
votes
1answer
35 views

Which Nginx log file is for fail2ban?

I have files in /var/log/nginx/ the log file /var/log/nginx/access.log is empty. But the /var/log/nginx/access.log.1 is being appended as always. In file /etc/fail2ban/fail2ban.conf, logtarget = ...
-1
votes
2answers
42 views

Running python script on anisble

I have an ansible server that I find works fine, but when I try to run a python script on the deployed servers I get no such file or directory, even though I visually confirm they are there. Here's ...
1
vote
1answer
80 views

Trying to install CloudWatch Agent on Ubuntu 14.04: “Failed to create virtualenv”

I am trying to install AWS CloudWatch Log Agent on Ubuntu 14.04 following this guide: http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/QuickStartEC2Instance.html When I type in ...
0
votes
0answers
14 views

uWSGI process switching to root user after starting?

I got a vanilla flask/uwsgi/nginx setup on ubuntu 14.04, with the wsgi app started with an Upstart script with uid:guid set to www-data, and no virtual env The uwsgi init file: [uwsgi] base = ...
-2
votes
1answer
23 views

Python and java static IP [closed]

I have a Python server. Each time I change the network the IP changes. I want it to have a static IP over all networks so it can receive data without customizing the code every time. I want to do the ...
0
votes
0answers
23 views

How can I run websocket server on Virtual Private Server that use apache?

I am trying to implement a websocket server on a virtual private server that uses apache. This websocket socket server is tornado which is written in python Testing websocket on my local machine I ...
1
vote
0answers
47 views

Nginx serve static files for flask app 404

I've tried numerous solutions of other posts, but nothing seems to work for me, I always get a 404 error, when trying to let nginx serve static files of my flask application. Somewhere in between all ...
2
votes
0answers
33 views

Cannot install from ansible-galaxy on an FC22 machine

Ansible is installed from github, as per ansible site's instructions, and appears to work OK. But galaxy fails thusly: # ansible-galaxy -vvv install goozbach.epel Using /etc/ansible/ansible.cfg as ...
0
votes
1answer
70 views

Windows Server 2012 R2 not printing from Task Scheduler

I have a script, written in Python, that generates a PDF document and prints it to network printer. When I execute that script through the cmd line or launch executable .cmd or .bat file, it works ...
1
vote
0answers
35 views

Django Invalid HTTP_HOST header: '\x80\xc7\xda\x9e'

I am getting errors from Django 1.7 application hosted in Digital ocean. Invalid HTTP_HOST header: '\x80\xc7\xda\x9e'. The domain name provided is not valid according to RFC 1034/1035. Request ...
0
votes
0answers
29 views

CentOS 6.4 YUM Python error

I'm getting an odd YUM error using the shell which I can't find any answers to elsewhere. What's weirder is that this worked fine on a very similar machine. It's a CentOS 6.4 machine and both YUM ...
0
votes
2answers
172 views

Unable to run a python3 script in CentOs7 [with python2.7] via cronjob

I have been trying to deal with this strage problem all morning. I have a simple crawler.py file, which contans a code that can only run under python3 to be exact under python3.3 evenrionment Now, ...
0
votes
1answer
71 views

Unable to install Rtree 0.8.2 package on RHEL6 64-bit

UPDATE: If it also helps. I have root access. Seems like I am not the only with the problem, but a couple had this problems https://github.com/ioos/conda-recipes/pull/198 I had updated my core.py ...
0
votes
1answer
90 views

Jupyter notebook SSL: WRONG_VERSION_NUMBER error only through Apache

I'm trying to set up a secured Jupyter notebook on my Apache 2.4.7 server. If there's a better, easier, or more secure way to do it, that'd be great. I know AuthType Basic doesn't really add much, I ...
0
votes
0answers
18 views

Python changes to user profile data

Forgive me if my terminology if a bit off, I have little expertise in networking and domains. To the point: After calling python "example.py" in a batch file, the script executed perfectly. However, ...
0
votes
0answers
6 views

No connection could be made because the target machine actively refused it error: [Errno 10061] [duplicate]

I start a server on socket using self.sock.bind(('0.0.0.0',0)). How can I make other machines connect to that port? I connect to public IP address and that port, I get : error: [Errno 10061] No ...
0
votes
0answers
26 views

trying certificate authentication with python3 - ftplib got an unexpected keyword argument 'context'

I got this error while trying to use ftplib.FTP_TLS function as described in documentation here. Here is my MWE : (I run it with python3 on debian) import sys,ssl from ftplib import FTP_TLS # only ...
0
votes
0answers
38 views

web2py running mod_wsgi on Apache - “ImportError: No module named site”

Im having problem to run web2py on apache. OS is CentOS Apache 2.4 Python is installed in /usr/lib/python2.7/ defualt.conf looks like: NameVirtualHost *:80 NameVirtualHost *:443 <VirtualHost ...
-1
votes
1answer
96 views

How to install python module(s) via pip using salt?

I need to install the paramiko module of python on multiple machines using the salt stack. I looked at the documentation about how to do this, but was not able to understand the syntax. Can someone ...
0
votes
0answers
19 views

Does Microsoft SQL Server have something similar to 'sqlite:///:memory:'?

Python 2.7 SQLAlchemy Microsoft SQL Server Management Studio 10.50.2500.0 Microsoft Analysis Services Client Tools 10.50.2500.0 Microsoft Data Access Components ...
0
votes
1answer
43 views

Programmatically Check AWS EC2 CPU and Memory usage

Does boto3 make it possible to access EC2 CPU and Memory usage? I looked here, but couldn't find anything in the docs. How do I programmatically check memory and CPU usage on an EC2 server running ...
0
votes
0answers
21 views

Ping request timed out when basehttpserver is loading website

I am running a website using basehttpserver. 10.0.xx.xx is the ip to access the site. There is a 'controller' with a cellular modem on it, which hosts the website and runs the basehttpserver. When ...
-1
votes
1answer
39 views

Apache Error (AH01276), Cannot serve directory /var/www/project/:

I am trying to deploy a Django web app on a newly installed centos7 server. for this i am using apache2.4 with mod_wsgi. i am stuck at serving the static files and because i am new to this, this is ...
0
votes
1answer
49 views

Can Nagios NRPE call a Python script on a Windows host, which requires a UNC network share connection?

I have a Nagios host which is monitoring Windows servers using NRPE. One of the tasks is to remotely connect to a Windows Server, using NRPE, and run a Python script. The python script simply checks ...