Questions tagged [python]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
7 views

Regarding how Big companies set up their databases

I am trying to understand how do companies which handle a large database requests set up their infrastructure. I have recently created a few python applications which store data in PostGres and ...
user avatar
0 votes
0 answers
15 views

configure inactivity timeout while handling keepalive probes

I am developing a TCP echo server using python and the socket library. I'd like to have a timeout configured for each incoming connection. So to drop and close them if there is inactivity for a ...
user avatar
  • 101
0 votes
1 answer
14 views

python virtual environment on rolling distro (Arch)

I am a big fan of the rolling distribution model. I do need help with one hiccup. when I create a virtual environment in python to isolate a project all works great until my rolling distro upgrades ...
user avatar
  • 205
0 votes
0 answers
8 views

Creating a custom CloudWatch Event to monitor every new commit for GitHub repository instead of CodeCommit repo state change

Could you please assist me in understanding if it is possible to create a custom CloudWatch Event to monitor every new commit for GitHub repositories instead of CodeCommit repo state changes? It has ...
user avatar
  • 1
0 votes
0 answers
33 views

Socks5 proxy requests (via Selenium) are nerfed; same requests via cURL works

Good Day, I've seen a lot of questions like this but I haven't seen anything similar to my situation. I am not sure if this is the right or best place to ask. The issue I am facing is that I have a ...
user avatar
0 votes
0 answers
21 views

Random segmentation fault errors on apt, pip, pipenv

One day after a normal restart, my debian system started throwing random segmentation faults on apt install/update/remove, pip commands, and anything that used pip. I've followed numerous guides to ...
user avatar
0 votes
1 answer
23 views

'pip3 freeze' and 'sudo pip3 freeze' are different

On my system (Raspbian Buster, raspberry pi CM4), packages installed with 'pip3 install ' are not available when I run 'sudo python3': $ pip3 freeze |grep numpy numpy==1.21.5 $ sudo python3 Python 3.7....
user avatar
0 votes
0 answers
18 views

PYTHONPATH with limited access directories and shared Anaconda installation

We have a shared Anaconda install on a Windows 2016 server where users have varied access rights. We set PYTHONPATH to point a network drive (P:/code) to enable the import of custom modules. When a ...
user avatar
3 votes
5 answers
950 views

Ansible OpenSSL Error with apt module

This is rather odd, I noticed it yesterday on one of my target machines, and today its happening on the rest of them too. I also tried running the playbook from a different machine and the same thing ...
user avatar
  • 133
0 votes
0 answers
31 views

Faking a display on a VM

Can I fake a display with some X11 magic somehow on a headless VM? I had this old machine that was about to croak so I am moving all its code into a VM. It is going well but some small snippet of ...
user avatar
  • 67
0 votes
0 answers
114 views

Ansible "hip-profiles unexpected here" Palo alto panos_security_rule

I'm trying to set a security policy on my Palo Alto firewalls using Ansible with the panos_security_rule module. However, I keep running in to the same error, hip-profiles unexpected here. I found ...
user avatar
  • 63
0 votes
0 answers
16 views

rpm is not installing dependencies, how to fix that?

I am using fpm to create an rpm for our application and need some dependencies as part of it. yum install gcc zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel tk-devel ...
user avatar
0 votes
0 answers
15 views

project based on python3.6 on ubuntu 20.04

I need to move django app from ubuntu 16 to 20.04, it's based on python 3.6 but default for ubuntu is 3.8. There's also cron jobs, uwsgi etc I'm not a python dev, what would be the best approach? Do I ...
user avatar
  • 1
0 votes
0 answers
46 views

Mounting a filesystem for all processes from within a service/webserver

I'm trying to create a local website that allows me to decrypt a file, mount its contained filesystem and start a systemd service without accessing the console. The started service then uses the files ...
user avatar
0 votes
0 answers
35 views

How to set python3 command to work in aws linux 2?

I followed first approach in this link to install python 3.8 Steps I followed: sudo yum install -y amazon-linux-extras amazon-linux-extras | grep -i python sudo amazon-linux-extras enable python3.8 ...
user avatar
0 votes
0 answers
13 views

Error while making graphs using json files and python

arunkannan@ubuntu:~/cascade-cpp$ make graphs mkdir -p study/graphs/papers rm -f study/graphs/papers/*.png source /home/arunkannan/cascade-python/env/bin/activate && \ python /home/arunkannan/...
user avatar
0 votes
2 answers
32 views

How to invoke a .env file into a Django project that runs in a Docker container on a K8s server?

I most likely only need a hint into the right direction. I have a docker container running a Django app using gunicorn and nginx. This Django app is currently getting its environment variables from a ....
user avatar
  • 159
0 votes
0 answers
50 views

How to connect to remote Greenbone Community with a unix socket over ssh?

I want to use python-gvm to get reports from greenbone. For this I need a ssh connection which listen to a unix socket. At first I create a test user for the ssh connection. It should use the script ...
user avatar
  • 103
0 votes
0 answers
48 views

mod_wsgi daemons not working

I setup mod_wsgi on my ubuntu/apache2 server. I'm trying to run threads but daemons do not work. When I try to run them in the background, nothing happens. My wsgi script: import sys, logging sys.path....
user avatar
  • 101
0 votes
0 answers
138 views

Error 502: Deploy Django application with Gunicorn and Nginx

I have developed a web application with Django and I am trying to publish it in a virtual machine created with Azure. To do that I'm using the following software stack: Ubuntu (20.04) Django (3.0.7) ...
user avatar
0 votes
1 answer
23 views

Centos 7.9 python3 cant find modules installed via yum

My stub python3 program cannot find the "pytz" module: [me@mybox]$ uname -a Linux portal2 3.10.0-1160.53.1.el7.x86_64 #1 SMP Fri Jan 14 13:59:45 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux [me@...
user avatar
1 vote
1 answer
33 views

Deploy a PHP application that calls python scripts on AWS

I've made a PHP site that calls a bunch of python workers in the background (using the queue-worker system in laravel, where the worker calls the python tool via CLI). The python tools each have their ...
user avatar
  • 111
0 votes
0 answers
147 views

NodeJS can't find python: gyp ERR! find Python

I'm trying to run a script but nodejs can't find python for some reason. I have tried reinstalling python, reinstalling nodejs, reinstalling my OS, running (and rebooting afterwards): export PYTHON=&...
user avatar
  • 1
0 votes
1 answer
69 views

GNU Mailman3 + Postfix: 550 5.1.1 <root@localhost>: Recipient address rejected: User unknown in local recipient table

I am just trying to run GNU Mailman3 with Postfix+Nginx+Postgres. This is the latest GNU/Linux Debian stable so I just apt-get installed mailman3-full and did some standard changes to the config files....
user avatar
  • 123
0 votes
0 answers
14 views

Which server specs to look for for a Scheduler in a data stack?

I'm in the process of building a data stack for a small company : the choice has been made to have a UNIX server running as a "Scheduler". The goal of this scheduler is just to extract data ...
user avatar
1 vote
2 answers
31 views

multiple portion selection of a string in python

I have a log file as below: 12-02-2022 15:18:22 +0330 SOCK5.6699 00000 user144 97.251.107.125:38605 1.1.1.1:443 51766 169369 0 CONNECT 1.1.1.1:443 12-02-2022 15:18:27 +0330 SOCK5.6699 00094 user156 32....
user avatar
1 vote
1 answer
114 views

Why does Apache with mod_wsgi force a download of .py files instad of executing them?

Why does Apache with mod_wsgi force a download of .py files instead of executing them? I'm trying to run Django, but the first issue I have is .py files not executing. I'm following the docs here ...
user avatar
0 votes
1 answer
46 views

Hosting a Python sockets server on the web

I made a simple chat app for my friends and I to use, but I don't want to host the server on my computer, I want to host it on the web. Does anyone know any good services or tutorials on doing this?
user avatar
  • 1
0 votes
0 answers
137 views

407 Proxy Authentication Error When Running Python in Docker but *Not* when running from local environment

I'm having a peculiar issue. When I make requests running my script on my local machine and go through the (paid and authenticated) proxy, it runs just fine. However, when I containerize the ...
user avatar
0 votes
1 answer
421 views

Apache2: Why do I get a 403 Forbidden error?

I've been messing with this for days :( Why do I get a 403 Forbidden error at example.com/contact? Is this a file/folder permissions, Apache user, virtualhosts or Python issue? I'm trying to run a ...
user avatar
2 votes
1 answer
434 views

jsonPayload (structured logging) output from Python Google Cloud Function's logging needed to create Log-Based Metrics (LBM) in GCP

I need the jsonPayload in the logs of a Google Cloud Function instead of the textPayload. My aim is to use the keys of the dictionary as labels (see Log-based metrics labels) for Log-Based Metrics so ...
user avatar
2 votes
2 answers
42 views

How does a competent System Manager track ALL the Python packages their users install?

It recently became painfully obvious that I just don't know how I'm supposed to manage Python packages on my systems. I simply MUST be able to know what all is installed and under what user IDs, since ...
user avatar
  • 1,128
0 votes
1 answer
44 views

Tar and 7z compression on Linux - what's the difference?

I have a problem! I have a backup script in python. It backups all the folders in /var/www/ into different .tar.7z for each folder inside /var/www/ The problem is that the compression time is very ...
user avatar
  • 329
0 votes
1 answer
47 views

Does my swapping server with ~80GB available RAM need even more?

I'm administering a Debian Linux x86_64 server with 125GB RAM, a 10GB swap partition and a swappiness value of 60. A free -gw output prints: total used free shared ...
user avatar
  • 3
0 votes
1 answer
68 views

Execute sequence of commands in fortinet

I would like to execute three commands in a fortinet firewall, the commands are: #To enter in the config mode: config vdom #To select the virtual domain: edit "name" #To see the info I want: ...
user avatar
0 votes
1 answer
22 views

After mailman upgrade to mailman3, can't use CLI utilities: ImportError: No module named Mailman

After walking down the garden path of reading the documentation, and being led astray - in particular, by the materials I found here - out of pure frustration I eventually found my way to the "...
user avatar
  • 1,128
0 votes
1 answer
112 views

Running multiple flask applications with different domain names using mod_wsgi

We are trying to run 2 different flask applications with different domain names from same server using mod_wsgi + Apache2. This is the settings configured in httpd.conf # For www.yyy.com ...
user avatar
1 vote
1 answer
226 views

No connection to Kafka from Faust client

I am having a hard time connection to a machine running Kafka from a client running a Faust script.The script looks like this: import faust import logging from asyncio import sleep class Test(faust....
user avatar
0 votes
1 answer
34 views

run ngrok using subprocess. how to use subprocess with both ip address and port?

def runNgrok(): ngrokDir = "/home/ubuntu/ngrokFunctionalities" port = 8081 ngrok_command = "ngrok" make_executable = str(Path(ngrokDir, ngrok_command)) ngrok = ...
user avatar
2 votes
1 answer
916 views

Docker Compose Port Not Exposed?

I have a simple Python based web server running in a container set up with docker compose that exposes port 8080. When I docker-compose up the services it reports the ports are exposed but the port is ...
user avatar
0 votes
1 answer
41 views

How to keep a Python app running?

My problem is that i want to keep a Python app running, but it stops every 2-3 days. Is there a way to autorestart the .py when it stops. Is there a way to monitor that? Probably there is but i can't ...
user avatar
0 votes
1 answer
305 views

Reading only the metadata of a file in a Google Cloud Storage bucket into a Cloud Function in Python (without loading the file or its data!)

I need something like Cloud Storage for Firebase: download metadata of all files, just not in Angular but in Python and just for a chosen file instead. The aim is to return this information when the ...
user avatar
0 votes
0 answers
17 views

IBM Cloud counterpart of Google Cloud App Engine (GAE) Flexible

I am exploring moving from Google Cloud to IBM Cloud. My needs are pretty simple in that I am looking to use managed infrastructure (standard python 3.7 runtime). I want to be able to specify the ...
user avatar
  • 21
0 votes
0 answers
772 views

Why doesnt creating a sym link from python to python 3 work?

My goal is to make sure that python refers to python3 in my mac terminal. What i have tried so far are the following two attempts 1. Adding an alias in .zshrc alias python=python3 after re sourcing ...
user avatar
0 votes
0 answers
24 views

Server CPU Usage Above 100% for the Past Week [duplicate]

My server running ubuntu and flask for a webapp as well as scrapy, selenium, and postfix has been experiencing very abnormal cpu usage. This server has not used as much cpu load in the past, but has ...
user avatar
0 votes
0 answers
170 views

Gateway Timeout Error AWS Lightsail

I have a flask API container deployed on Lightsail. When I make a request to one of the API endpoints, I get a 504 gateway error as the status on the client-side. However, when I check the server logs ...
user avatar
1 vote
0 answers
34 views

How does AWS Lightsail Container Service manage memory?

I have a container deployment running on Lightsail that manipulates and returns a list of file-like objects. I'm using these objects because Lightsail container deployments do not support persistent ...
user avatar
0 votes
0 answers
30 views

error connecting to linux server from windows client

When a windows machine pings to linux server to run application specific python commands, it does connect. The firewall is also disabled on linux server. mongodb is database server here. database is ...
user avatar
  • 123
0 votes
0 answers
21 views

Apache2 add directory alias only for 2 of 4 server name alias

I have a .conf file for my Apache2 server. The thing is, I have 4 different subdomains pointing to the same application, but inside the VirtualHost tag I need a Directory with an alias that can only ...
user avatar
  • 1
0 votes
1 answer
220 views

Openstack Installation via Devstack: AssertionError /usr/lib/python3.8/distutils/core.py

I am getting above error while setuptools replace disutils when execute ./stack.sh. I am using Ubuntu Server 20.04 VM and following this link. There is nothing much available on internet about this ...
user avatar
  • 99

1
2 3 4 5
34