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

learn more… | top users | synonyms

0
votes
0answers
15 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
33 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
26 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
7 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 ...
-2
votes
0answers
22 views

Webmin error after installing Python 3.4 on FreeBSD

After installing Python 3.4 on our FreeBSD server with pkg install Webmin stopped working and only displays Error - Missing Content-Type Header after login Default Python is still 2.7 as was before ...
-1
votes
0answers
50 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
26 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
23 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, ...
3
votes
1answer
67 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
34 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
33 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
37 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
29 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
28 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
41 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
13 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
19 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
19 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
33 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
26 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
55 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
22 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
20 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
154 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
60 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
62 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
15 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
25 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
51 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
18 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
34 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
19 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
35 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
43 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 ...
1
vote
2answers
67 views

Jenkins : Python script with arguments

Note: Never used jenkins before I have a python script that takes in 3 arguments to run. Via a terminal you would use it like this: python script.py arg1 arg2 arg3 I want to create a new jenkins ...
0
votes
0answers
39 views

Python script to delete HPSA RHEL software policy items(rpms)

I'm looking to script the deletion of HPSA software policy items (RHEL RPMs) from HP Server Automation server. In our environment we have "HP Server Automation 10.22", using rhn_import command we ...
0
votes
0answers
31 views

Python/Django/WSGI/Apache webserver gateway timeout with outgoing SSL connections with urllib2/urllib3/requests

I have a webserver serving Django through Apache 2.4 with mod_wsgi and Python 2.7 on Ubuntu 14.04. Outgoing connections with any of urllib2, urllib3, or requests, connections to non-SSL (on port 80) ...
0
votes
0answers
9 views

Creating images and use ionice to prevent the script from using too many I/O resources

I have a python script that generates images for me and updates a database. I need to create almost ~200k images and for every image it does an insert to the database. I have a VPS with 100GB ...
1
vote
0answers
17 views

urllib3 failure through Apache/WSGI; successful from python commandline

I have a webserver serving Django through Apache 2.4 with mod_wsgi and Python 2.7 on Ubuntu 14.04. When first setup, outgoing connections from this webserver using the Python library urllib3 were ...
1
vote
1answer
62 views

Nginx and Gunicorn 'err_conn_refused', but nginx not logging error

I've been playing around with Django Cookie Cutter for local projects, and wanted to put it on my DO Droplet as a semi-production staging environment. The server is set up with Nginx reverse ...
0
votes
0answers
44 views

sh: x-terminal-emulator: command not found

I got this message during apt-get upgrade in my Ubuntu server 14.04, and I have no idea what is it. E: changelog for this version is not (yet) available; try ...
1
vote
0answers
28 views

How to get the output of the python script executed in aws instance

I am trying to automate the aws instance setup using boto. I have a python script in which I will do the ssh to the instance. After ssh,I am executing a python function which is in remote python file ...
0
votes
1answer
36 views

How to Use Puppet python module in manifest file

I am writing a puppet manifest file to install python and pymongo. This python module is installed on the server, link shown below https://forge.puppetlabs.com/stankevich/python Here is the ...
1
vote
0answers
27 views

mpiexec won't run mpi4py script when two hosts are utilized in an MPI cluster established through LAN

So I have this other desktop PC, that serves as my server, primesystem and a laptop as my client, zerosystem that is connected to it. They both serve as my ssh-server and ssh-client respectively, and ...
4
votes
2answers
35 views

How to tell whether a serial connection is “established”?

We have a Debian-based embedded device. It runs an application that communicates with other embedded equipment via serial (RS-232, /dev/ttyS*). Usually, this works just fine. But of course, sometimes ...
0
votes
1answer
24 views

Ansible error with_together and user management

Having some annoying issue that I just cannot figure out. Here is my code. If I completely comment out the group and groups variables everything works fine. But this as is spits out the errors ...
0
votes
4answers
65 views

Script started with nohup get killed when leave terminal

I need to run some python scripts with infinite loop on ubuntu server (Amazon EC2). And I really like the idea to use nohup as it is simple and I can have output.out log file. I start script like ...
1
vote
0answers
16 views

Issues with URL length in Apache/mod_wsgi

I have a python wsgi API in which I process incoming URL payloads of varied length. I believe, but am not absolutely sure, that I may have run into a limitation of URL size. For a particular payload ...