Categories
Mastering Development

Unable to import airflow providers package

I am unable to import airflow providers package for Google. Command I used was pip3 install apache-airflow-backport-providers-google And it gives me the error ERROR: Could not find a version that satisfies the requirement apache-airflow-backport-providers-google (from versions: none) ERROR: No matching distribution found for apache-airflow-backport-providers-google Due to which my DAG is stuck and the error message […]

Categories
Mastering Development

Server-DB Communication Issue at Built

Setup Consider this relatively simple docker-app using fastapi as server and couchdb as db. Here is the project structure ├── app.py ├── compose │   ├── couchdb.Dockerfile │   └── server.Dockerfile ├── docker-compose.yml ├── .env # Global vars e.g. DB credentials ├── Pipfile # For local dev ├── Pipfile.lock # Same └── requirements.txt Here are is my […]

Categories
Mastering Development

SLURM task fails when creating an instance of the Dask LocalCluster in an HPC cluster

I’m queuing a task with the command sbatch and the next configuration: #SBATCH –job-name=dask-test #SBATCH –ntasks=1 #SBATCH –cpus-per-task=10 #SBATCH –mem=80G #SBATCH –time=00:30:00 #SBATCH –tmp=10G #SBATCH –partition=normal #SBATCH –qos=normal python ./dask-test.py The python script is, more or less, as follows: import pandas as pd import dask.dataframe as dd import numpy as np from dask.distributed import Client, […]

Categories
Linux Mastering Development Ubuntu

Spyder not launching on ubuntu i tried reinstalling and updating but nothing works

the error that am getting in the terminal is this: Traceback (most recent call last): File "/home/kshitij/anaconda3/bin/spyder", line 11, in sys.exit(main()) File "/home/kshitij/anaconda3/lib/python3.7/site-packages/spyder/app/start.py", line 204, in main mainwindow.main() File "/home/kshitij/anaconda3/lib/python3.7/site-packages/spyder/app/mainwindow.py", line 3748, in main mainwindow = run_spyder(app, options, args) File "/home/kshitij/anaconda3/lib/python3.7/site-packages/spyder/app/mainwindow.py", line 3621, in run_spyder main = MainWindow(options) File "/home/kshitij/anaconda3/lib/python3.7/site-packages/spyder/app/mainwindow.py", line 355, in init from […]

Categories
Database Development

Using Python to insert JSON into PostgreSQL

I have the following table: create table json_table ( p_id int primary key, first_name varchar(20), last_name varchar(20), p_attribute json, quote_content text ) Now I basically want to load a json object with the help of a python script and let the python script insert the json into the table. I have achieved inserting a JSON […]

Categories
Linux Mastering Development Ubuntu

Error reading cbr and cbz

I recently installed UbuntuStudio 19, upgarded to 20 I get strange error messages while trying to open cbr or cbz files. i’m sure the files are good beacause i can open them fine on windows and I could open them on Ubuntu and LinuxMint (previous installs). Also, I can unzip them fine and the images […]

Categories
Linux Mastering Development Ubuntu

python3.7: (Pyttsx3) No module named ‘pyttsx3’

I had a program (using module pyttsx3) written in Windows which I used to run on python3.7, and it used to run well. But,when I try to run it on Ubuntu 20.04, it doesn’t run. I have both python3.8.2 and python3.7.7 installed on my Ubuntu 20.04 PC, running the program with python3.8.2 interpreter gives the […]

Categories
User Help

Issues with fitLine() in opencv2 [migrated]

I’m trying to write a simple function that fits a line to a binary image: # threshold image thr = cv2.threshold(src, 0, 255, cv2.THRESH_OTSU)[1] # get angle vx,vy = cv2.fitLine(numpy.float32(thr), cv2.DIST_L1, 0, 0.01, 0.01)[:1] But I’m getting this error: Traceback (most recent call last): File “orient.py”, line 24, in <module> main() File “orient.py”, line 14, […]

Categories
Linux Mastering Development

WLST Python script unable to accpet the variable from Shell Script

I created a WLST Script that checks if a user belongs to a particular group. The shell script reads input for the user and group name & sends to it to the python script. This is the python script: d_user=sys.argv[1] print ‘User is ‘ +d_user d_group=sys.argv[2] print ‘Group is ‘ +d_group connect(userConfigFile=’WebLogicConfig.properties’,userKeyFile=’WebLogicKey.properties’,url=’t3://wl-test.com:80′) realmName=cmo.getSecurityConfiguration().getDefaultRealm() authProvider = […]

Categories
Mastering Development

conda install packages error: Collecting package metadata (current_repodata.json): failed

there. When I use ‘conda install‘ to install packages, I always get an annoying error: Collecting package metadata (current_repodata.json): failed The detailed report can be seen through this link: error report My machine info: win 10 (64 bit), Anaconda 2020.02 for Windows. I tried to reinstall the previous version of anaconda, but it doesn’t work. […]