ubuntu

NGINX Configuration Issue: One Domain Works, Another Doesn't

NGINX Configuration Issue: One Domain Works, Another Doesn't Question: I’m facing an issue with my NGINX configuration where one of my domains works correctly, but the other doesn’t. I have two domains (domain1.site and domain2.site) with their respective configurations in NGINX. Here’s the NGINX configuration for domain1.site: server { listen 80; server_name domain1.site www.domain1.site; return …

Total answers: 1

Ara issues in python

Ara issues in python Question: I am facing this issue when I try to enter an ara command: user@server:~ ara playbook list /usr/local/lib/python3.8/dist-packages/django/core/handlers/base.py:58: UserWarning: No directory at: /home/user/.ara/server/www/static/ mw_instance = middleware(adapted_handler) I am running this in Ubuntu 20.04.6 LTS. user@server:~$ which python3 /usr/bin/python3 user@server:~$ python3 –version Python 3.8.10 user@server:~$ pip list | grep ara ara …

Total answers: 1

OSError: Path does not exist or is not directory: '/usr/lib/python3/dist-packages/ryu/app/gui_topology/html/'

OSError: Path does not exist or is not directory: '/usr/lib/python3/dist-packages/ryu/app/gui_topology/html/' Question: I was trying to open RYU topology viewer. I created a tree topology using these commands: user@ubuntu:~$ sudo mn –topo tree,3 –controller remote [sudo] password for user: *** Creating network *** Adding controller Unable to contact the remote controller at 127.0.0.1:6653 Unable to contact …

Total answers: 1

Persist environment variables for future ansible tasks

Persist environment variables for future ansible tasks Question: i´m triying to set in my localhost via a play env vars for future tasks/playbooks in the same localhost. – name: Environment_vars hosts: 127.0.0.1 connection: local vars: env_vars: /opt/env_vars.yml env_path: ~/.bashrc tasks: – name: put into .bashrc lineinfile: path: "{{env_path}}" state: present regexp: "^{{ item.key }}=" line: …

Total answers: 1

Error while installing QGIS on Ubuntu 20.04

Error while installing QGIS on Ubuntu 20.04 Question: I’m trying to install QGIS for ubuntu 20.04 with this guide https://freegistutorial.com/install-qgis-on-ubuntu-20-04-focal-fossa/ I managed step one and successfully installed and upgradedgnupg software-properties-common, but when trying out step 2 i get the following message: gpg: key 46B5721DBBD2996A: public key "QGIS Archive Automatic Signing Key (2021) <[email protected]>" imported gpg: …

Total answers: 1

How to set the LANG for a python script running through systemd?

How to set the LANG for a python script running through systemd? Question: On the server where I run the program the default encoding is latin-1, and when I try to run a python script I get an error like ‘latin-1’ codec can’t encode characters in position, etc. I know you can change the default …

Total answers: 1

ModuleNotFoundError: No module named '_curses' on Ubuntu 22.04

ModuleNotFoundError: No module named '_curses' on Ubuntu 22.04 Question: I want to use curses for a personnal Python project. However, when I try to import it, I get the following error : >>> import curses Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/xxxxxx/.asdf/installs/python/3.9.13/lib/python3.9/curses/__init__.py", line 13, in <module> from _curses import …

Total answers: 1

torch hub error for yolov5 in ubuntu aws ec2 instance

torch hub error for yolov5 in ubuntu aws ec2 instance Question: I install torch and open cv like this pip3 install torch torchvision torchaudio –extra-index-url https://download.pytorch.org/whl/cpu pip install opencv-python then I run this code in ubuntu aws ec2 instance import torch # Model model = torch.hub.load(‘ultralytics/yolov5’, ‘yolov5s’) # Image im = ‘car.jpg’ # Inference results …

Total answers: 1

Extracting ID from file using python script?

Extracting ID from file using python script? Question: I’m trying to extract just the sequence ID from the the file in Linux server. To give you few examples TRINITY_DN0_c0_g1_i1.p1 and TRINITY_DN0_c0_g1_i3.p1 and sequence IDs. The sequence ID lengths are not same but they all start with TRINITY and ends with .p1. I tried using awk …

Total answers: 2