Traceback (most recent call last):
File "F:\GAMES-MOVIE-VIDEO-MUSIC COLLECTION [OPTICAL-DIGITAL]\DIGITAL COPIES\QOBUZ MUSIC\Qo-DL-Reborn\qo-dl_reborn.py", line 21, in
client = qopy.Client()
File "F:\GAMES-MOVIE-VIDEO-MUSIC COLLECTION [OPTICAL-DIGITAL]\DIGITAL COPIES\QOBUZ MUSIC\Qo-DL-Reborn\qopy\qopy.py", line 16, in init
self.id, self.sec = self.cfg_setup(False)
File "F:\GAMES-MOVIE-VIDEO-MUSIC COLLECTION [OPTICAL-DIGITAL]\DIGITAL COPIES\QOBUZ MUSIC\Qo-DL-Reborn\qopy\qopy.py", line 163, in cfg_setup
id = spoofer.get_app_id()
File "F:\GAMES-MOVIE-VIDEO-MUSIC COLLECTION [OPTICAL-DIGITAL]\DIGITAL COPIES\QOBUZ MUSIC\Qo-DL-Reborn\spoofbuz.py", line 20, in get_app_id
return re.search(self.appId_regex, self.bundle).group("app_id")
AttributeError: 'NoneType' object has no attribute 'group'
I have been trying to make some graphs in pyqt5 that can update more quickly and efficiently than my currently embedded matplotlib ones.
I keep running into the same problem whenever I run any example code including pyqtgraph, which always throw the following error:
"TypeError: isdeleted() argument 1 must be sip.simplewrapper, not PlotWidget"
Environment:
Spyder 3.3.2 Python 3.7.1 64-bit | Qt 5.9.6 | PyQt5 5.9.2 | Windows 10.
After running pip freeze I learned my versions are numpy==1.20.1, PyQt5==5.15.2, PyQt5-sip==12.8.1, pyqtgraph==0.11.1
I'm using a very simple test graph from a turial (Link).
from PyQt5 import QtWidgets
from pyqtgraph import PlotWidget, plot
import pyqtgraph as pg
import sys # We need sys so that we can pass argv to QApplication
import os
class MainWindow(QtWidgets.QMainWindow):
def __init__(self, *args, **kwargs):
super(MainWindow, self).__init__(*args, **kwargs)
self.graphWidget = pg.PlotWidget()
self.setCentralWidget(self.graphWidget)
hour = [1,2,3,4,5,6,7,8,9,10]
temperature = [30,32,34,32,33,31,29,32,35,45]
# plot data: x, y values
self.graphWidget.plot(hour, temperature)
def main():
app = QtWidgets.QApplication(sys.argv)
main = MainWindow()
main.show()
sys.exit(app.exec_())
if __name__ == '__main__':
main()
The code which causes the error most recent in traceback is in "Qt.py", in the following code:
# Common to PyQt4 and 5
if QT_LIB in [PYQT4, PYQT5]:
QtVersion = QtCore.QT_VERSION_STR
try:
from PyQt5 import sip
except ImportError:
import sip
def isQObjectAlive(obj):
return not sip.isdeleted(obj)
loadUiType = uic.loadUiType
QtCore.Signal = QtCore.pyqtSignal
The full traceback is much longer, and is as follows:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\graphicsItems\GraphicsObject.py", line 40, in itemChange
ret = sip.cast(ret, QtGui.QGraphicsItem)
TypeError: cast() argument 1 must be sip.simplewrapper, not PlotItem
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\graphicsItems\ViewBox\ViewBox.py", line 438, in resizeEvent
self.updateAutoRange()
File "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\graphicsItems\ViewBox\ViewBox.py", line 890, in updateAutoRange
childRange = self.childrenBounds(frac=fractionVisible)
File "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\graphicsItems\ViewBox\ViewBox.py", line 1355, in childrenBounds
px, py = [v.length() if v is not None else 0 for v in self.childGroup.pixelVectors()]
File "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\graphicsItems\GraphicsItem.py", line 189, in pixelVectors
dt = self.deviceTransform()
File "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\graphicsItems\GraphicsItem.py", line 108, in deviceTransform
view = self.getViewWidget()
File "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\graphicsItems\GraphicsItem.py", line 65, in getViewWidget
if v is not None and not isQObjectAlive(v):
File "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\Qt.py", line 328, in isQObjectAlive
return not sip.isdeleted(obj)
TypeError: isdeleted() argument 1 must be sip.simplewrapper, not PlotWidget
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\graphicsItems\GraphicsObject.py", line 40, in itemChange
ret = sip.cast(ret, QtGui.QGraphicsItem)
TypeError: cast() argument 1 must be sip.simplewrapper, not PlotDataItem
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\graphicsItems\GraphicsObject.py", line 40, in itemChange
ret = sip.cast(ret, QtGui.QGraphicsItem)
TypeError: cast() argument 1 must be sip.simplewrapper, not PlotDataItem
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\graphicsItems\GraphicsObject.py", line 26, in itemChange
self.parentChanged()
File "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\graphicsItems\GraphicsItem.py", line 463, in parentChanged
self._updateView()
File "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\graphicsItems\GraphicsItem.py", line 480, in _updateView
view = self.getViewBox()
File "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\graphicsItems\GraphicsItem.py", line 88, in getViewBox
vb = self.getViewWidget()
File "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\graphicsItems\GraphicsItem.py", line 65, in getViewWidget
if v is not None and not isQObjectAlive(v):
File "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\Qt.py", line 328, in isQObjectAlive
return not sip.isdeleted(obj)
TypeError: isdeleted() argument 1 must be sip.simplewrapper, not PlotWidget
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\graphicsItems\GraphicsObject.py", line 40, in itemChange
ret = sip.cast(ret, QtGui.QGraphicsItem)
TypeError: cast() argument 1 must be sip.simplewrapper, not ChildGroup
Traceback (most recent call last):
File "<ipython-input-2-5f5dea77ec5e>", line 1, in <module>
runfile('C:/Users/dowdt/GoogleDrive/Documents/Purdue/GraduateSchool/Homologation/Software/Python Test Code/Python GUI practice/pyqt5LiveGraphExample.py', wdir='C:/Users/dowdt/GoogleDrive/Documents/Purdue/GraduateSchool/Homologation/Software/Python Test Code/Python GUI practice')
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 704, in runfile
execfile(filename, namespace)
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 108, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/dowdt/GoogleDrive/Documents/Purdue/GraduateSchool/Homologation/Software/Python Test Code/Python GUI practice/pyqt5LiveGraphExample.py", line 30, in <module>
main()
File "C:/Users/dowdt/GoogleDrive/Documents/Purdue/GraduateSchool/Homologation/Software/Python Test Code/Python GUI practice/pyqt5LiveGraphExample.py", line 24, in main
main = MainWindow()
File "C:/Users/dowdt/GoogleDrive/Documents/Purdue/GraduateSchool/Homologation/Software/Python Test Code/Python GUI practice/pyqt5LiveGraphExample.py", line 19, in __init__
self.graphWidget.plot(hour, temperature)
File "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\graphicsItems\PlotItem\PlotItem.py", line 653, in plot
self.addItem(item, params=params)
File "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\graphicsItems\PlotItem\PlotItem.py", line 530, in addItem
self.vb.addItem(item, *args, **vbargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\graphicsItems\ViewBox\ViewBox.py", line 409, in addItem
self.updateAutoRange()
File "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\graphicsItems\ViewBox\ViewBox.py", line 890, in updateAutoRange
childRange = self.childrenBounds(frac=fractionVisible)
File "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\graphicsItems\ViewBox\ViewBox.py", line 1355, in childrenBounds
px, py = [v.length() if v is not None else 0 for v in self.childGroup.pixelVectors()]
File "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\graphicsItems\GraphicsItem.py", line 189, in pixelVectors
dt = self.deviceTransform()
File "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\graphicsItems\GraphicsItem.py", line 108, in deviceTransform
view = self.getViewWidget()
File "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\graphicsItems\GraphicsItem.py", line 65, in getViewWidget
if v is not None and not isQObjectAlive(v):
File "C:\ProgramData\Anaconda3\lib\site-packages\pyqtgraph\Qt.py", line 328, in isQObjectAlive
return not sip.isdeleted(obj)
TypeError: isdeleted() argument 1 must be sip.simplewrapper, not PlotWidget
I'm getting configparser.NoSectionError: No section: 'creds
Config.cfg file
[creds]
token = telegram_bot_token
code.py file
class telegram_bot() :
def __init__(self,config):
self.token=self.read("config.cfg")
self.base="https://api.telegram.org/bot{}/".format(self.token)
def read(self,config):
self.parser=cfg.RawConfigParser()
self.parser.read(config)
return self.parser.get('creds','token')
Error
Traceback (most recent call last):
File "MAINSERVER.PY", line 5, in <module>
bots=telegram_bot("config.cfg")
File "G:\BOT\TBOT\bs4\qrcode\main.py", line 6, in __init__
self.token=self.read("config.cfg")
File "G:\BOT\TBOT\bs4\qrcode\main.py", line 24, in read
return self.parser.get('creds','token')
File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python38-32\lib\configparser.py", line 781, in get
d = self._unify_values(section, vars)
File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python38-32\lib\configparser.py", line 1149, in _unify_values
raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'creds'
Anybody know what could be the issue ?
I run:
from nltk.corpus import framenet as fn
fn.frames()
And get the following error:
Traceback (most recent call last):
File "/Users/me/anaconda3/envs/nlp/lib/python3.6/site-packages/nltk/corpus/reader/framenet.py", line 1308, in frame_by_name
elt = XMLCorpusView(locpath, 'frame')[0]
File "/Users/me/anaconda3/envs/nlp/lib/python3.6/site-packages/nltk/corpus/reader/xmldocs.py", line 155, in __init__
encoding = self._detect_encoding(fileid)
File "/Users/me/anaconda3/envs/nlp/lib/python3.6/site-packages/nltk/corpus/reader/xmldocs.py", line 166, in _detect_encoding
with open(fileid, 'rb') as infile:
NotADirectoryError: [Errno 20] Not a directory: '/Users/me/nltk_data/corpora/framenet_v17.zip/framenet_v17/frame/Abandonment.xml'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/me/anaconda3/envs/nlp/lib/python3.6/site-packages/nltk/corpus/reader/framenet.py", line 876, in __repr__
for elt in self:
File "/Users/me/anaconda3/envs/nlp/lib/python3.6/site-packages/nltk/collections.py", line 406, in iterate_from
try: yield self._func(self._lists[0][index])
File "/Users/me/anaconda3/envs/nlp/lib/python3.6/site-packages/nltk/corpus/reader/framenet.py", line 1407, in frame
f = self.frame_by_id(fn_fid_or_fname, ignorekeys)
File "/Users/me/anaconda3/envs/nlp/lib/python3.6/site-packages/nltk/corpus/reader/framenet.py", line 1268, in frame_by_id
return self.frame_by_name(name, ignorekeys, check_cache=False)
File "/Users/me/anaconda3/envs/nlp/lib/python3.6/site-packages/nltk/corpus/reader/framenet.py", line 1310, in frame_by_name
raise FramenetError('Unknown frame: {0}'.format(fn_fname))
nltk.corpus.reader.framenet.FramenetError: Unknown frame: Abandonment
Both the Framenet 1.5 and 1.7 corpora are installed, according to nltk.download()
eng = matlab.engine.start_matlab()
for line in matcode:
eng.workspace(line, nargout=0)
res = eng.workspace['x']
eng.quit()
and matcode.txt object string is
'x = [1 1;1 2;1 3;1 4];'
Couldn't figure out why is this happening :(
Traceback (most recent call last):
File "lreg.py", line 14, in <module>
main()
File "lreg.py", line 10, in main
data = matlab_engine.start_engine(code_object)
File "/Users/hiteshkr/PycharmProjects/MLCO/matlab_engine.py", line 7, in start_engine
eng.workspace(line, nargout=0)
TypeError: 'MatlabWorkSpace' object is not callable