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
Mastering Development

TypeError while posting data into django models

I want to write an API to a create user. User can belong to 3 different types (Admin, Merchant, DeliveryAgent). All the types of users has same model filed except DeliveryAgent has addition fields to store his vehicle info which is stored in a different model. User Model class User(AbstractBaseUser, PermissionsMixin): first_name = models.CharField(max_length=255, blank=False) […]

Categories
Mastering Development

find_all() method from BeautifulSoup returns empty list

I am new to programming and also new to pyhon. My intension is to built an ebay webscraper. I am trying to extract an list of links with the bs4 find_all() method, but no matter what I try, it returns always an empty list. def get_index_data(soup): try: links = soup.find_all(‘a’, {‘class’: ‘s-item__link’}) print(links) except: links […]

Categories
Linux Mastering Development Ubuntu

pip install pyopenssl object has no attribute ‘SSL_ST_INIT’

I’ve searched this forum for the same issues and none of the fixes worked for me. I have a Ubuntu 18.04 and any python 2.7 modules that need OpenSSL I get an attribute error. Pip install command always gives attribute error, but a pip freeze command works. I tried (unsuccessfully) the commands: pip install -U […]

Categories
Mastering Development

Django sqlite3 OperationalError near “WHERE”: syntax error

I am trying to query an sqlite database with custom sql in django and when I run the query I get OperationalError at /production/Libre-Badge-Demo-Template/ near “WHERE”: syntax error I have heard talk of django’s sqlite engine being unable to insert multiple parameters but I’m not sure what to make of that. here is the query […]

Categories
Mastering Development

After successful insalliation of psycop2 there was DLL load failed while importing _psycopg error while running any command in my pycharm terminal

I have installed psycop2 on my virtualenv. Then after running any command in my pycharm terminal I am getting this error: (venv) C:\Users\ADMIN\PycharmProjects\django_pro_postgres\django_project>python manage.py makemigrations Traceback (most recent call last): File “C:\Users\ADMIN\PycharmProjects\django_pro_postgres\venv\lib\site-packages\django\db\backends\postgresql\base.py”, line 25, in <module> import psycopg2 as Database File “C:\Users\ADMIN\PycharmProjects\django_pro_postgres\venv\lib\site-packages\psycopg2\__init__.py”, line 51, in <module> from psycopg2._psycopg import ( # noqa ImportError: DLL load […]

Categories
Mastering Development

Import error while Executing AWS Predictive Maintenance Using Machine Learning Sample

We are trying to execute and check what kind of output is provided by Predictive Maintenance Using Machine Learning on AWS sample data. We are referring Predictive Maintenance Using Machine Learning and AWS Guide to launch the sample template provided by the AWS. The template is executed properly and we can see the resources in […]

Categories
Mastering Development

Python – Calling a function from a different class to draw a line using PyQt Error: “‘sip.wrappertype'”

I am trying to create two classes using PyQt to create a gui like so; import sys from PyQt5.QtGui import QPainter, QPen, QBrush from PyQt5.QtWidgets import QWidget, QApplication from PyQt5.QtCore import Qt, QRect, QPoint class line(): def makeline(): qp.drawLine(250,250,350,300) test = line() class ShapeDrawer(QWidget): def __init__(self): super().__init__() self.setGeometry(50, 50, 500, 500) self.show() def paintEvent(self, event): […]

Categories
Linux Mastering Development Ubuntu

What’s the difference between python python3 and python 3.7?

I use these commands to get the version and the result are here. What’s the difference between them. $ python –version Python 2.7.17 $ python3 –version Python 3.6.9 $ python3.7 –version Python 3.7.5 Besides, what I want is minimal requirement Python 3.6 since I test VTA on ubuntu bu get these errors. $ python vta/tests/python/integration/test_benchmark_topi_conv2d.py […]

Categories
Mastering Development System & Network

Facing Issue while installing MySQL with Linux

I am facing a weird issue while installing MySQL on Linux machine. I was trying to configure MySQL as backend database to work on Airflow. Below are my configurations: Operating System: Red Hat Enterprise Linux Server 7.7 python 3.7.2 anaconda 3 spark 2.45 I am able to connect to MySQL but facing an error while […]