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

learn more… | top users | synonyms

3
votes
0answers
283 views

ImportError: No module named flask - uwsgi and buildout

uWSGI config: <uwsgi> <module>app_wsgi:app</module> <pythonpath>./src</pythonpath> <socket>/tmp/uwsgi.sock</socket> ...
3
votes
0answers
199 views

How to support VRF in Netflow Collector?

I am somehow able to analyze netflow packet using my own netflow collector (build in python). It works for certain ip and CIDR(Classless Inter Domain routing), definitely not overlapping. What is the ...
2
votes
0answers
58 views

HP MSA 2312 XML API “Unauthorized access requested”

I'm trying to write a custom Nagios Plugin to monitor a HP MSA2312fc via the HTTP XML API. I can successfully log into the system via /api/login/{login_hash} but always get the error "Unauthorized ...
2
votes
0answers
87 views

Not seeing Django logs on Heroku

I'm not seeing log entries (at a level of INFO) made by Django in my Heroku logs. This is my configuration: LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'filters': { ...
2
votes
0answers
93 views

uWSGI vs Twisted Matrix

uWSGI can be configured in ashyncronous mode same as Twisted Matrix, but has anyone tried to compare these to servers in terms of performance? If we need to develop a Python web app handling thousands ...
2
votes
0answers
113 views

Supervisord not closing http ports

I'm trying to use Supervisord to keep my node.js web app alive. However when I run supervisorctl shutdown, it doesn't close the http port that node.js uses. Is there a way to configure Supervisord ...
2
votes
0answers
308 views

Why did cherokee-admin-launcher crash?

I'm trying out the Cherokee http server on a seemingly fine machine. Following simple set-up instructions, I tried running cherokee-admin-launcher but it printed error messages and hung up. Ctrl-C ...
1
vote
0answers
8 views

apache fails to load mod_wsgi: complains of 'missing symbol'

When I run apachectl configtest after installing mod_wsgi I get the following error message: httpd: Syntax error on line 117 of /private/etc/apache2/httpd.conf: Cannot load ...
1
vote
0answers
47 views

Is my site getting hacked (Bluehost)?

I'm running a simple website off of Bluehost, and I needed to use custom Python scripts so I created a cgi-bin folder in my site's directory and added my cgi python files there. Everytime I tried to ...
1
vote
0answers
92 views

Pyramid + Nginx + uWSGI Server 500 Errors

I have a uWSGI application written in Python using the Pyramid framework. Nginx is configured like below (I left out a few bits, but I don't think they will matter): upstream uwsgicluster { ...
1
vote
0answers
37 views

HP-UX: Python error on os.uname() function

Has anyone ever seen the Python os.uname() function fail on HP-UX? > python -c "import os; print os.uname()" Traceback (most recent call last): File "<string>", line 1, in <module> ...
1
vote
0answers
259 views

rhel 6.4 pip with proxy error : name or service not known

the pip command pip search statsd --proxy=http://anadi.misra:XXXXXXXXX@192.168.200.77:8080 Now my password contains an @ too so I give the encoded form in password; i.e. some@pass is supplied as ...
1
vote
0answers
190 views

Failed to emerge python 2.7

I'm trying to emerge python 2.7 on my gentoo server, somehow it's not installed any more. eselect python list Available Python interpreters: [1] python3.3 * If I try to emerge it like emerge -a ...
1
vote
0answers
18 views

How to safely upgrade the version of libxml2 on our server

We currently libxml2 2.7.7 installed on our servers. This is a dependency of lxml which we use on two difference clusters of Zope instances runing our 2 Plone CMS applications. We'd like to upgrade ...
1
vote
0answers
249 views

pysqlite for python 3.3.5 on Centos 6.5

I have compiled python 3.3.5 from source in the /opt folder as follows: yum install sqlite-devel ./configure --prefix=/opt/python3 make make install ln -s /opt/python3/bin/python3 /usr/bin/python3 ...
1
vote
0answers
84 views

python urllib2 hangs when invoked by apache

I have a python script that reads a resource using urllib2 like so response = urllib2.urlopen('http://www.google.com') html = response.read() response.close() which works fine when invoked in a ...
1
vote
0answers
137 views

Example pyodbc db2 connection

I am trying to get a pyodbc connection (on a Centos machine), to a DB2 database running on an IBM i. Whatever connection string or configuration I add, I always get the same message .. Traceback ...
1
vote
0answers
400 views

Ubuntu Locales Incorrect for Python Application

I have a NGINX -> UWSGI -> Django(python) stack installed on an Ubuntu AMI on Amazon EC2. I've run into a problem when accessing a file with unicode characters in the name. The exact output from the ...
1
vote
0answers
195 views

How to tell uWSGI to prefer processes to threads for load balancing

I've installed Nginx + uWSGI + Django on a VDS with 3 CPU cores. uWSGI is configured for 6 processes and 5 threads per process. Now I want to tell uWSGI to use processes for load balancing until all ...
1
vote
0answers
458 views

mod_wsgi ImportError with a flask app

I'm trying to deploy a Flask app using apache and mod_wsgi. I've been following the directions here. The simple hello-world example that is on that site works perfectly. When I try to substitute my ...
1
vote
0answers
64 views

Soccorro server does not work

I tried to configure Socorro server with apache as described here. I started httpd, but when I contact it with browser it doesn't respond. In lynx I get: HTTP request sent; waiting for response. When ...
1
vote
0answers
42 views

Automatically create virtualenvs for new user accounts

In Linux, how can I go about automatically creating virtualenvs for each newly created user account? Can it easily be done?
1
vote
0answers
509 views

How do I reduce the threads per process limit for an ISAPI app under IIS 7.5

I have a python WSGI application running under an ISAPI extension in IIS 7.5 on Windows Server 2008. I would like to increase the number of worker processes (which I know how to do) and reduce the ...
1
vote
0answers
370 views

Command not found, when it's in a directory on the path

I have the following environment variable set (trying for a 12-factor app approach): PATH="/home/hope/env/bin:$PATH" /home/hope/env/bin is the bin directory of a virtualenv, it has gunicorn and ...
1
vote
0answers
105 views

“Error importing middleware” while upgrading to Django 1.5 from Django 1.4?

I have a shared hosting account with Python 2.7.2 installed. I have done a local installation of Django 1.4 (python setup.py install --user) and everything was working fine. I decided to upgrade to ...
1
vote
0answers
270 views

Executing a python script from PHP to open a socket

I have a python script chatserver.py that includes:- #!/usr/bin/python from twisted.internet.protocol import Protocol, Factory from twisted.internet import reactor <SNIP> ...
1
vote
0answers
371 views

IIS FTP 7.5 not responding with 226 during file put using Python 2.7.3 client with FTP_TLS

I am experiencing very strange behavior with IIS FTP 7.5 on Windows 2008 Server R2 and a python 2.7.3 ftp module I am writing. The module does a ftp connect with the FTP_TLS library in FTP Active ...
1
vote
0answers
53 views

Passenger_wsgi.py given precedence over DirectoryIndex?

I was having an issue with my site today, where apache wasn't serving index.php by default. I had moved passenger_wsgi.py to the directory above document root so that I could serve python files ...
1
vote
0answers
159 views

Apache will not start with mod_wsgi enabled

I'm trying to run Apache with mod_wsgi to run Python scripts. The server is running Ubuntu 12.04 with Zend Server installed, but when I enable the wsgi module Apache will not start. I get an error ...
1
vote
0answers
196 views

Bottle.py application times out on mod_wsgi and uwsgi but works in dev mode

I have a bottle.py application that performs well in dev mode. However, a function that has a larger database query is causing the app to time out when run in either uwsgi or the browser to time out ...
1
vote
0answers
593 views

Getting Python to work in IIS 7 using pyISAPIie

I have been trying for the past few hours to get python working on a test machine. The machine is running Server 2008 SP2 with IIS7 (32 bit). I have nearly all the role's services installed except for ...
1
vote
0answers
128 views

Lighttpd + django on gentoo 10 seconds to answer

I want to run a Django site on a lighttpd with fastcgi on a gentoo machine. Everytime I try to access the site I get a response after more or less exactly 10 seconds. Im using a socket to let lighttpd ...
1
vote
0answers
160 views

nTop Graphing Scripts

I would like to graph the RRD files that nTop creates, but I don't want to re-invent the wheel. What I Know There is an API for nTop that involves python. I have read the details of it yet. I know ...
1
vote
0answers
404 views

Run python script as a service on Ubuntu 11.10

I am facing the following problem. I want to run a python script as a service on Ubuntu 11.10 system (already mentioned in the following link: ...
1
vote
0answers
134 views

email handling with inbox.py and nginx

I have a Flask web application running behind gunicorn and Nginx. Nginx proxies any traffic to ivrhub.org to the correct flask app. I would very much like to use inbox.py to process some incoming ...
1
vote
0answers
99 views

Error running Solr

I'm trying to install Apache Solr for Plone, via collective.solr. I've followed the instructions above, and extended my buildout with: [buildout] extends = buildout.cfg ...
1
vote
0answers
1k views

Fixing problems with yum, urllib2, and missing dependencies?

I've been trying to resolve the following problem with yum / python's urllib2: [root@...]# yum Traceback (most recent call last): File "/usr/bin/yum", line 4, in ? import yum File ...
1
vote
0answers
843 views

Running Celery as a Daemon while using VirtualEnv

I've setup and tested celery on my amazon linux server, using mysql as the messaging backend and it works fine when running the program directly. My python project and celery install are located in a ...
1
vote
0answers
256 views

How can I use WPHP with Python Paste

It was suggested to me in answer to my question How can I use Python’s CGIHTTPRequestHandler as a dev server for PHP that I try WPHP. I've tried: import wphp my_php_app = ...
1
vote
0answers
468 views

Python server does not excecute PHP script: permission denied

I am trying to execute a PHP file through a Python server. However, I get the following error: File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/CGIHTTPServer.py", line ...
0
votes
0answers
6 views

UnicodeDecodeError starting Radicale server during boot process

I set up the Radicale CalDAV server on Debian Wheezy (raspbian). I can launch it manually as expected. However, when I try to start it during boot process it fails with the following error: ...
0
votes
0answers
15 views

OpenVPN Python plugin

I have a task about authentication OpenVPN users using database which is located on remote server (not a host with OpenVPN server instance). And we use Python as main language for all our tools. ...
0
votes
0answers
8 views

Download log files from a server with Fabric

I'm using Fabric to download some log files from a server. So far so good, i'm having problems with the following scenario: env.roledefs = { 'dev': ['192.168.0.5'], 'hml': ['192.168.0.5'], ...
0
votes
0answers
24 views

Writing a fail2ban multiline regex

I've got some troublesome hosts trying it on with an SSH server I run, and I'm trying to ban them using fail2ban. Problem is, I haven't done much work with regexes, and even less with Python regexes. ...
0
votes
0answers
54 views

Apache not serving my python app

So here's my apache config: LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so <VirtualHost *:80> ServerAdmin marijus.merkevicius@gmail.com ServerName 31.220.49.197 ...
0
votes
0answers
17 views

Elasticsearch service automatilly terminates

When i try to start the elasticsearch service, it starts normally (no error messages). But terminates immidiately. There is no log in the /var/log/elasticsearch directory.I'm using elasticsearch ...
0
votes
0answers
90 views

Mount NFS share and symlink it to a directory using non-Administrator account

I'm on Windows 8.1 Enterprise and what I'm trying to do is to have a python script that will: Mount an NFS share for the current user Create a symlink in the current working directory to a drive ...
0
votes
0answers
27 views

Can I change uWSGI options when sending SIGHUP?

I'm using uWSGI to host a Python web app, and am interested in graceful reloading. It seems like sending SIGHUP to the master process is the simplest solution for my setup. The docs don't seem to ...
0
votes
0answers
129 views

Nginx returning 500 Error instead of 400 Error

On validating user input into my api, I want to return 400 http status codes for bad requests. It works fine from flask and when running my api through gunicorn, but they always come out of nginx ...
0
votes
0answers
60 views

VMware Creating Windows Images through commandline

I have a ESX server and I'm using Vsphere client to connect to ESX, I have to create more than 100 of windows images, which would be a combination of Windows XP,Windows Server 2003, Windows 7 etc. ...