Categories
Linux Mastering Development

ModuleNotFoundError: No module named ‘_sqlite3’

We have different python version installed and specifically using python3.7 so I have edited my .bashrc file. We are using Centos7 with Linux server. # .bashrc # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi # Uncomment the following line if you don’t like systemctl’s auto-paging feature: # export SYSTEMD_PAGER= # […]

Categories
Mastering Development

ImportError: cannot import name ‘Type’

After executing a svm code i get this error: The typung package is already installed from sklearn import svm File "C:\Python35\lib\site-packages\sklearn\__init__.py", line 82, in <module> from .base import clone File "C:\Python35\lib\site-packages\sklearn\base.py", line 20, in <module> from .utils import _IS_32BIT File "C:\Python35\lib\site-packages\sklearn\utils\__init__.py", line 20, in <module> from scipy.sparse import issparse File "C:\Python35\lib\site-packages\scipy\__init__.py", line 156, in <module> […]

Python output a string in json file UnicodeEncode Error

everybody. An error occurs when I’m trying to output a string in json file. Get json file: -*- coding: utf-8 -*- with open("{0}".format(releaseName), "w", encoding="utf-8") as f: json.dump(releases, f, indent=2, ensure_ascii=False) Open file and read string: -*- coding: utf-8 -*- release = open("./releases/{}".format(relVersion), "r", encoding="utf-8") releaseDict = json.load(release) releaseStatus = releaseDict["Status"] print("Release status:", releaseStatus) I […]

Categories
Mastering Development

Repeating a function inside a function in a class

I am a beginner how can I fix my problem which I want to repeat another function before it is called This is my code: class Banking: def __init__ (self): self.balance = 0 def intro (self): print (‘Welcome to Banking and services’) def deposit (self): dep = float (input (‘Enter amount to be deposited: ‘)) […]

Categories
Mastering Development System & Network

gsutil from gcloud/Google Cloud SDK failing with “SyntaxError: invalid syntax” error in bcrypt

Trying to use gsutil today I got the following error: + gsutil cp -nra public-read a gs://b /usr/local/lib/python2.7/dist-packages/cryptography/__init__.py:39: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release. CryptographyDeprecationWarning, Traceback (most recent call last): File "/usr/lib/google-cloud-sdk/bin/bootstrapping/gsutil.py", line […]

Categories
Mastering Development

pip3 throws undefined symbol: XML_SetHashSalt

I am having python 3.6.8 on oracle Linux EL7 I installed pip3 using yum install python36-pip however, when ever I invoke pip3 it is having library error pip3 Traceback (most recent call last): File "/bin/pip3", line 8, in <module> from pip import main File "/usr/lib/python3.6/site-packages/pip/__init__.py", line 42, in <module> from pip.utils import get_installed_distributions, get_prog File […]

Cant Run this Python File. Can you help?

I am using Kali Linux 2019 , Trying to install this Source : https://github.com/ptrkrysik/multi-rtl I have installed everything required, but what dose this, here, mean here? I run ./mutlirtl_rx_to_cfile_2chan.py as root, and get this error message. Traceback (most recent call last): File "./mutlirtl_rx_to_cfile_2chan.py", line 17, in <module> import multi_rtl File "/usr/local/lib/python2.7/dist-packages/multi_rtl/__init__.py", line 30, in <module> […]

Categories
Mastering Development

ERROR: Found input variables with inconsistent numbers of samples: [rows, columns]

i dont know what to do. I want to print out the classifier score but its not working. Can someone Help me? I really dont know what is the Problem maybe its something with the Numpy Array (numpy.arrange). Traceback (most recent call last): File "C:/Users/Maximilian.Grinik/PycharmProjects/Augenbewegung/main.py", line 27, in <module> xG_train,xG_test,yG_train,yG_test = train_test_split(xG,yG,test_size=0.33) File "C:\Users\Maximilian.Grinik\PycharmProjects\Augenbewegung\lib\site-packages\sklearn\model_selection\_split.py", line […]

Categories
Linux Mastering Development Ubuntu

Applications missing after “fsck”

I had an error on booting which left [initramfs] on the screen, after checking using another computer I ran the fsck as recommended, itallowed me to use the recovery mode on rebooting. However the Sofware updater, and others from the System menu will not run. I can update from the CLI. I read it might […]

Categories
Mastering Development

Wine not running on google cloud run

This is my docker file, which is installing wine in order to run some exes that I want to, on Google cloud run: ARG BASE_IMAGE="ubuntu" ARG TAG="latest" FROM ${BASE_IMAGE}:${TAG} # Install prerequisites RUN apt-get update \ && DEBIAN_FRONTEND="noninteractive" apt-get install -y –no-install-recommends \ apt-transport-https \ ca-certificates \ cabextract \ git \ gosu \ gpg-agent \ […]