Interesting situation!
I has parser.py script, link to it below in 1, with feedparser library.
When i just started it, i get such exceptions:
Connected to pydev debugger (build 172.3757.67)
pydev debugger: process 20017 is connecting
Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_vars.py", line 354, in evaluate_expression
compiled = compile(expression, '<string>', 'eval')
File "<string>", line 1
feedparser.parse(http://www.malware-traffic-analysis.net/blog-entries.rss)
^
SyntaxError: invalid syntax
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_comm.py", line 1134, in do_it
result = pydevd_vars.evaluate_expression(self.thread_id, self.frame_id, self.expression, self.doExec)
File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_vars.py", line 356, in evaluate_expression
Exec(expression, updated_globals, frame.f_locals)
File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_exec2.py", line 3, in Exec
exec(exp, global_vars, local_vars)
File "<string>", line 1
feedparser.parse(http://www.malware-traffic-analysis.net/blog-entries.rss)
^
SyntaxError: invalid syntax
Even more, i didn't go to point with:
feedparser.parse(http://www.malware-traffic-analysis.net/blog-entries.rss)
Such problem appear over first import in script which import json!
Also in my code i get http strings from txt file, like:
RssProcess('rsslinks.txt')
So, first i thing that problem in this file and delete string
http[:]//www.malware-traffic-analysis.net/blog-entries.rss
from it. But it didn't help! So i has script that works perfectly, but it get exceptions which doesn't stop it. Exceptions i saw in PyCharm debugger.
My specs:
macOS Sierra 10.12.6
pycharm 2017.2
python 3.6.2
Link to GitHub
Related
friends...
I've just installed IDLE3 package for Python (running Python 3.8)...
When I try to start it there is a message like this:
[ibmsys01#gustavo-ubuntu ~/zPDT]$ idle
** Invalid host: ('192.168.0.17', 57676)
Traceback (most recent call last):
File "/usr/bin/idle", line 5, in <module>
main()
File "/usr/lib/python3.8/idlelib/pyshell.py", line 1516, in main
shell = flist.open_shell()
File "/usr/lib/python3.8/idlelib/pyshell.py", line 331, in open_shell
if not self.pyshell.begin():
File "/usr/lib/python3.8/idlelib/pyshell.py", line 1049, in begin
client = self.interp.start_subprocess()
File "/usr/lib/python3.8/idlelib/pyshell.py", line 465, in start_subprocess
self.rpcclt.accept()
File "/usr/lib/python3.8/idlelib/rpc.py", line 544, in accept
raise OSError
OSError
[ibmsys01#gustavo-ubuntu ~/zPDT]$
I haven't found any reference to this error. Has any of you seen it before? Can you please help get through it?
My environment is:
Linux Ubuntu 20.04 LTS
Python 3.8.5
IDLE3
An additional detail: invoking "idle" or "idle3" gives me the same error.
Can you please help me get through this?
Thank you and best regards.
Gustavo.
So I finally got my python program working on my Mac (Catalina 10.15.4), but I am greeted with the following error when it is opened on another Mac (High Sierra 10.13.6.)
Could not import the PyAudio C module '_portaudio'.
Traceback (most recent call last):
File "/Volumes/dist/Riff Gen.app/Contents/Resources/__boot__.py", line 355, in <module>
_run()
File "/Volumes/dist/Riff Gen.app/Contents/Resources/__boot__.py", line 340, in _run
exec(compile(source, path, 'exec'), globals(), globals())
File "/Volumes/dist/Riff Gen.app/Contents/Resources/riffgen_v1.01.py", line 9, in <module>
from pysine import sine
File "pysine/__init__.pyc", line 14, in <module>
File "pysine/pysine.pyc", line 1, in <module>
File "pyaudio.pyc", line 116, in <module>
ImportError: dlopen(/Volumes/dist/Riff Gen.app/Contents/Resources/lib/python3.6/lib-dynload/_portaudio.so, 2): Symbol not found: ____chkstk_darwin
Referenced from: /Volumes/dist/Riff Gen.app/Contents/MacOS/../Frameworks/libportaudio.2.dylib (which was built for Mac OS X 10.15)
Expected in: /usr/lib/libSystem.B.dylib
in /Volumes/dist/Riff Gen.app/Contents/MacOS/../Frameworks/libportaudio.2.dylib
A simple tkinter test with various sounds and images works fine on the second machine, but not this script. I've tried adding all the packages manually, tried --nostrip, manually including 'libportaudio.2.dylib', and dozens of other ideas from countless outdated forums to no avail.
When the play function of my application is stripped, the app opens and crashes shortly thereafter - giving me the following error:
Traceback (most recent call last):
File "/Volumes/RG no audio/Riff Gen.app/Contents/Resources/__boot__.py", line 81, in <module>
_run()
File "/Volumes/RG no audio/Riff Gen.app/Contents/Resources/__boot__.py", line 66, in _run
exec(compile(source, path, 'exec'), globals(), globals())
File "/Volumes/RG no audio/Riff Gen.app/Contents/Resources/riffgen_v1.01.py", line 2037, in <module>
root.mainloop()
File "tkinter/__init__.pyc", line 1277, in mainloop
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
Fatal Python error: PyEval_RestoreThread: NULL tstate
Current thread 0x00007fffa118e380 (most recent call first):
Abort trap: 6
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
Deleting expired sessions...none found.
[Process completed]
I have been using Python 3.6 and Py2App v0.13 because it is, unfortunately, the only version that has successfully packaged my program in a standalone package. Any version later than 0.13 gives me the following error even when bundling in alias mode:
Traceback (most recent call last):
File "/Users/Alex/Desktop/python_scripts/rhythm_generator/riffgen/dist/Riff Gen.app/Contents/Resources/__boot__.py", line 420, in <module>
_run()
File "/Users/Alex/Desktop/python_scripts/rhythm_generator/riffgen/dist/Riff Gen.app/Contents/Resources/__boot__.py", line 414, in _run
exec(compile(source, script, 'exec'), globals(), globals())
File "/Users/Alex/Desktop/python_scripts/rhythm_generator/riffgen/riffgen_v1.01.py", line 7, in <module>
from tkinter import *
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tkinter/__init__.py", line 36, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
ValueError: character U+6573552f is not in range [U+0000; U+10ffff]
I've seen a handful of people with similar errors to the one above, but the few solutions I've seen had no success.
I'm assuming there is a simple solution to both of these errors, but after a long two weeks of tinkering, I'm out of ideas. I just began programming and really want to continue to deploy GUI programs, so I am desperate to get this functional. Any help is greatly appreciated!!
Probably not an answer you were hoping for, but this might give you some ideas where to look:
check if you don't have multiple pythons installed. Make sure you run it with 3.6. (but you probably already did)
Check the modules installed on both PC's help('modules') in a python shell.
Check if the correct version of the modules is installed. Install the exact same versions pip install SomePackage==1.0.4
Symbol not found: ____chkstk_darwin seems to be a very mac related issue. I'd start searching there in combination with the modules you use in your script. This is the only post I found on stackoverflow and it suggests looking at the PATH settings; plaidml-setup uses the wrong lib path and gets OSErrors
so I have this program in python that I want to use pyinstaller to make into an executable. It runs perfectly on its own and pyinstaller makes the executable fine but when I run the executable I get this:
Traceback (most recent call last):
File "site-packages/pydrive/auth.py", line 386, in LoadClientConfigFile
File "site-packages/oauth2client/clientsecrets.py", line 165, in loadfile
File "site-packages/oauth2client/clientsecrets.py", line 125, in _loadfile
oauth2client.clientsecrets.InvalidClientSecretsError: ('Error opening file',
'client_secrets.json', 'No such file or directory', 2)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "updating.py", line 17, in <module>
File "site-packages/pydrive/auth.py", line 113, in _decorated
File "site-packages/pydrive/auth.py", line 443, in GetFlow
File "site-packages/pydrive/auth.py", line 366, in LoadClientConfig
File "site-packages/pydrive/auth.py", line 388, in LoadClientConfigFile
pydrive.settings.InvalidConfigError: Invalid client secrets file ('Error
opening file', 'client_secrets.json', 'No such file or directory', 2)
[34574] Failed to execute script updating
Why does this work on its own but pyinstaller doesn't catch anything until the executable is ran? I can't seem to find an answer otherwise.
Notable Info:
I'm running a Mac OS X, Mojave 10.14.2, Python Version 3.7.2.
The client_secrets.json is from a Google Drive API, v3
The file is in my directory just like all my other files, in the same spot.
Thanks!!
I am using Liclipse which is basically pydev with eclipse. The python file runs fine but when I try to use the pydev debugger on the same file the debugger fails to launch and I couldn't find anything about this error. Is it a bug in pydev? It even says "During handling of the above exception, another exception occurred"
I am using python 3.7.1
warning: Debugger speedups using cython not found. Run '"C:\Users\q4116\AppData\Local\Programs\Python\Python37-32\python.exe" "C:\Program Files\Brainwy\LiClipse 5.1.0\plugins\org.python.pydev.core_7.0.0.201811071259\pysrc\setup_cython.py" build_ext --inplace' to build.
pydev debugger: starting (pid: 20104)
Traceback (most recent call last):
File "_pydevd_bundle\pydevd_cython_win32_37_32.pyx", line 134, in _pydevd_bundle.pydevd_cython_win32_37_32.set_additional_thread_info
AttributeError: '_MainThread' object has no attribute 'additional_info'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files\Brainwy\LiClipse 5.1.0\plugins\org.python.pydev.core_7.0.0.201811071259\pysrc\pydevd.py", line 1951, in <module>
main()
File "C:\Program Files\Brainwy\LiClipse 5.1.0\plugins\org.python.pydev.core_7.0.0.201811071259\pysrc\pydevd.py", line 1945, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "C:\Program Files\Brainwy\LiClipse 5.1.0\plugins\org.python.pydev.core_7.0.0.201811071259\pysrc\pydevd.py", line 1295, in run
self.notify_thread_created(thread_id, t)
File "C:\Program Files\Brainwy\LiClipse 5.1.0\plugins\org.python.pydev.core_7.0.0.201811071259\pysrc\pydevd.py", line 662, in notify_thread_created
additional_info = set_additional_thread_info(thread)
File "_pydevd_bundle\pydevd_cython_win32_37_32.pyx", line 138, in _pydevd_bundle.pydevd_cython_win32_37_32.set_additional_thread_info
File "_pydevd_bundle\pydevd_cython_win32_37_32.pyx", line 147, in _pydevd_bundle.pydevd_cython_win32_37_32.set_additional_thread_info
File "_pydevd_bundle\pydevd_cython_win32_37_32.pyx", line 95, in _pydevd_bundle.pydevd_cython_win32_37_32.PyDBAdditionalThreadInfo.__init__
AttributeError: '_pydevd_bundle.pydevd_cython_win32_37_32.PyDBAdditionalThreadInfo' object has no attribute 'pydev_state'
Sorry about that. This is a bug in PyDev 7.0.0. I just finished uploading a new version for PyDev and LiClipse is almost there too (limiting factor is my internet connection speed, so, should be available in a few hours).
Meanwhile, removing the accelerators (and recreating if you want locally) should make it work again. i.e.: Remove _pydevd_bundle*.pyd and _pydevd_bundle\pydevd_frame_eval*.pyd and execute setup_cython.py locally (or don't if you're ok on going without the accelerator modules).
I had the same issue after an update of these packages :
Oomph Setup 1.11.0.v20181107-0652 org.eclipse.oomph.setup.feature.group Eclipse Oomph Project
PyDev for Eclipse 7.0.0.201811071319 org.python.pydev.feature.feature.group Fabio Zadrozny
PyDev for Eclipse Developer Resources 7.0.0.201811071319 org.python.pydev.feature.source.feature.group Fabio Zadrozny
Not running LiClipse but just Eclipse + pydev.
I solved it for now by reverting the update. Click Help > About Eclipse IDE > Installation Details > Installation History > Click on the last working version > Revert
I should have kept the error information though so that I could file a proper bug report ...
I have no experience with python and I am installing a mongodb tools from https://github.com/rueckstiess/mtools. After installation and launch the application I got below exception errors. It seems that there is a grama issue but I am not sure about it. Is it caused by python version? I am using python 2.7. How can I know which version fix this problem?
# mlaunch init --single
Traceback (most recent call last):
File "/usr/local/bin/mlaunch", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/mtools/mlaunch/mlaunch.py", line 1438, in main
tool.run()
File "/usr/local/lib/python2.7/dist-packages/mtools/mlaunch/mlaunch.py", line 260, in run
getattr(self, self.args['command'])()
File "/usr/local/lib/python2.7/dist-packages/mtools/mlaunch/mlaunch.py", line 280, in init
current_version = self.getMongoDVersion()
File "/usr/local/lib/python2.7/dist-packages/mtools/mlaunch/mlaunch.py", line 475, in getMongoDVersion
if current_version.rindex('v') > 0:
ValueError: substring not found