-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unhandled Python exception in m64py with usb controller #66
Comments
I'm also getting Given that error, I suspect the issue is that the code was written for Python 2 but *buntu 14.04 only has PyQt5 packages for Python 3 so I'm having to run it as |
The problem is caused by this line:
"devicename" is of type "bytes" which has no "encode" method. Commenting out lines 243-244 makes the problem disappear which I'm using as a workaround for now. |
I turns out the workaround is no good, now the config dialog is saving "key(...)" instead of "button(...)" or "axis(...)". The better workaround is to set the input config by hand and don't touch the input config dialog for now. |
This issue should be fixed with #73 |
python --version
Python 3.5.1
m64py from git.
To reproduce the problem you simply have to select the controller device in the input plugin window and close it.
python setup.py build_qt && ./m64py
with no starting mupen64plus.cfg
Unhandled Python exception
Aborted
Now running with ipython m64py
Traceback (most recent call last):
File "/home/oiu7/mupen64plus-ui-python/src/m64py/frontend/input.py", line 62, in closeEvent
self.save_config()
File "/home/oiu7/mupen64plus-ui-python/src/m64py/frontend/input.py", line 136, in save_config
self.save_opts()
File "/home/oiu7/mupen64plus-ui-python/src/m64py/frontend/input.py", line 244, in save_opts
self.config.set_parameter("name", devicename.encode())
AttributeError: 'bytes' object has no attribute 'encode'
If you suspect this is an IPython bug, please report it at:
https://github.com/ipython/ipython/issues
or send an email to the mailing list at ipython-dev@scipy.org
You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.
Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
%config Application.verbose_crash=True
Traceback (most recent call last):
File "/usr/bin/ipython", line 5, in
start_ipython()
File "/usr/lib/python3.5/site-packages/IPython/init.py", line 118, in start_ipython
return launch_new_instance(argv=argv, *_kwargs)
File "/usr/lib/python3.5/site-packages/traitlets/config/application.py", line 591, in launch_instance
app.initialize(argv)
File "", line 2, in initialize
File "/usr/lib/python3.5/site-packages/traitlets/config/application.py", line 75, in catch_config_error
return method(app, *args, *_kwargs)
File "/usr/lib/python3.5/site-packages/IPython/terminal/ipapp.py", line 320, in initialize
self.init_code()
File "/usr/lib/python3.5/site-packages/IPython/core/shellapp.py", line 299, in init_code
sys.stderr.flush()
AttributeError: 'Log' object has no attribute 'flush'
running with gdb python and the run m64py:
Unhandled Python exception
Program received signal SIGABRT, Aborted.
0x00007ffff737f5f8 in raise () from /usr/lib/libc.so.6
(gdb) bt
#0 0x00007ffff737f5f8 in raise () from /usr/lib/libc.so.6
#1 0x00007ffff7380a7a in abort () from /usr/lib/libc.so.6
#2 0x00007ffff50261e1 in QMessageLogger::fatal(char const*, ...) const () from /usr/lib/libQt5Core.so.5
#3 0x00007fffec653081 in ?? () from /usr/lib/python3.5/site-packages/PyQt5/QtCore.so
#4 0x00007fffec94ea76 in ?? () from /usr/lib/python3.5/site-packages/sip.so
#5 0x00007ffff63c31b2 in ?? () from /usr/lib/python3.5/site-packages/PyQt5/QtWidgets.so
#6 0x00007ffff5b4f9c8 in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#7 0x00007ffff63c25fb in ?? () from /usr/lib/python3.5/site-packages/PyQt5/QtWidgets.so
#8 0x00007ffff5b0c9ac in QApplicationPrivate::notify_helper(QObject_, QEvent_) () from /usr/lib/libQt5Widgets.so.5
#9 0x00007ffff5b11e86 in QApplication::notify(QObject_, QEvent_) () from /usr/lib/libQt5Widgets.so.5
#10 0x00007ffff63dd09e in ?? () from /usr/lib/python3.5/site-packages/PyQt5/QtWidgets.so
#11 0x00007ffff5219bab in QCoreApplication::notifyInternal(QObject_, QEvent_) () from /usr/lib/libQt5Core.so.5
#12 0x00007ffff5b4acad in QWidgetPrivate::close_helper(QWidgetPrivate::CloseMode) () from /usr/lib/libQt5Widgets.so.5
#13 0x00007ffff5b4e672 in ?? () from /usr/lib/libQt5Widgets.so.5
#14 0x00007ffff524831a in QMetaObject::activate(QObject_, int, int, void_) () from /usr/lib/libQt5Core.so.5
#15 0x00007ffff5ea75f2 in QAbstractButton::clicked(bool) () from /usr/lib/libQt5Widgets.so.5
#16 0x00007ffff5c09a94 in ?? () from /usr/lib/libQt5Widgets.so.5
#17 0x00007ffff5c0b0a9 in ?? () from /usr/lib/libQt5Widgets.so.5
#18 0x00007ffff5c0b224 in QAbstractButton::mouseReleaseEvent(QMouseEvent) () from /usr/lib/libQt5Widgets.so.5
#19 0x00007ffff63abb2b in ?? () from /usr/lib/python3.5/site-packages/PyQt5/QtWidgets.so
#20 0x00007ffff5b4f9c8 in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#21 0x00007ffff63ac84b in ?? () from /usr/lib/python3.5/site-packages/PyQt5/QtWidgets.so
#22 0x00007ffff5b0c9ac in QApplicationPrivate::notify_helper(QObject_, QEvent_) () from /usr/lib/libQt5Widgets.so.5
#23 0x00007ffff5b12589 in QApplication::notify(QObject_, QEvent_) () from /usr/lib/libQt5Widgets.so.5
#24 0x00007ffff63dd09e in ?? () from /usr/lib/python3.5/site-packages/PyQt5/QtWidgets.so
#25 0x00007ffff5219bab in QCoreApplication::notifyInternal(QObject_, QEvent_) () from /usr/lib/libQt5Core.so.5
#26 0x00007ffff5b11492 in QApplicationPrivate::sendMouseEvent(QWidget_, QMouseEvent_, QWidget_, QWidget_, QWidget**, QPointer&, bool) () from /usr/lib/libQt5Widgets.so.5
#27 0x00007ffff5b69f3b in ?? () from /usr/lib/libQt5Widgets.so.5
#28 0x00007ffff5b6c4fb in ?? () from /usr/lib/libQt5Widgets.so.5
#29 0x00007ffff5b0c9ac in QApplicationPrivate::notify_helper(QObject_, QEvent_) () from /usr/lib/libQt5Widgets.so.5
#30 0x00007ffff5b11e86 in QApplication::notify(QObject_, QEvent_) () from /usr/lib/libQt5Widgets.so.5
#31 0x00007ffff63dd09e in ?? () from /usr/lib/python3.5/site-packages/PyQt5/QtWidgets.so
#32 0x00007ffff5219bab in QCoreApplication::notifyInternal(QObject_, QEvent_) () from /usr/lib/libQt5Core.so.5
#33 0x00007ffff555a5f1 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) ()
from /usr/lib/libQt5Gui.so.5
#34 0x00007ffff555c2b5 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) ()
from /usr/lib/libQt5Gui.so.5
#35 0x00007ffff55416d8 in QWindowSystemInterface::sendWindowSystemEvents(QFlagsQEventLoop::ProcessEventsFlag) ()
from /usr/lib/libQt5Gui.so.5
#36 0x00007fffeb8ec8c0 in ?? () from /usr/lib/libQt5XcbQpa.so.5
#37 0x00007ffff46fadc7 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#38 0x00007ffff46fb020 in ?? () from /usr/lib/libglib-2.0.so.0
#39 0x00007ffff46fb0cc in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
---Type to continue, or q to quit---
#40 0x00007ffff527054f in QEventDispatcherGlib::processEvents(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/libQt5Core.so.5
#41 0x00007ffff521757a in QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) () from /usr/lib/libQt5Core.so.5
#42 0x00007ffff521f53c in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5
#43 0x00007ffff63db9db in ?? () from /usr/lib/python3.5/site-packages/PyQt5/QtWidgets.so
#44 0x00007ffff79bca89 in PyCFunction_Call () from /usr/lib/libpython3.5m.so.1.0
#45 0x00007ffff7a34a01 in PyEval_EvalFrameEx () from /usr/lib/libpython3.5m.so.1.0
#46 0x00007ffff7a35df2 in ?? () from /usr/lib/libpython3.5m.so.1.0
#47 0x00007ffff7a35ed3 in PyEval_EvalCodeEx () from /usr/lib/libpython3.5m.so.1.0
#48 0x00007ffff7a35efb in PyEval_EvalCode () from /usr/lib/libpython3.5m.so.1.0
#49 0x00007ffff7a55074 in ?? () from /usr/lib/libpython3.5m.so.1.0
#50 0x00007ffff7a57585 in PyRun_FileExFlags () from /usr/lib/libpython3.5m.so.1.0
#51 0x00007ffff7a576f6 in PyRun_SimpleFileExFlags () from /usr/lib/libpython3.5m.so.1.0
#52 0x00007ffff7a6e504 in Py_Main () from /usr/lib/libpython3.5m.so.1.0
#53 0x0000000000400af7 in main ()
The text was updated successfully, but these errors were encountered: