The relevant code (taken from version 3.1.2+dfsg1-1): def get_image_path(name, default="not_found.png"): """Return image absolute path""" for img_path in IMG_PATH: full_path = osp.join(img_path, name) if osp.isfile(full_path): return osp.abspath(full_path) if default is not None: return osp.abspath(osp.join(img_path, default))
The problem: When IMG_PATH is empty and default is defined, img_path is not defined and python will crash. ** Summary changed: - /usr/bin/spyder3:UnboundLocalError:/usr/bin/spyder3@3:main:/usr/lib/python3/dist-packages/spyder/app/mainwindow.py@120:get_image_path + spyder3: UnboundLocalError: local variable 'img_path' referenced before assignment ** Description changed: The Ubuntu Error Tracker has been receiving reports about a problem regarding spyder. This problem was most recently seen with package version 3.0.2+dfsg1-2, the problem page at https://errors.ubuntu.com/problem/f4a67211f66fb239047b33781abfae6849af207a contains more details, including versions of packages affected, stacktrace or traceback, and individual crash reports. If you do not have access to the Ubuntu Error Tracker you can request it at http://forms.canonical.com/reports/. + + Traceback (most recent call last): + File "/usr/bin/spyder3", line 3, in <module> + start.main() + File "/usr/lib/python3/dist-packages/spyder/app/start.py", line 103, in main + from spyder.app import mainwindow + File "/usr/lib/python3/dist-packages/spyder/app/mainwindow.py", line 120, in <module> + SPLASH = QSplashScreen(QPixmap(get_image_path('splash.svg'), 'svg')) + File "/usr/lib/python3/dist-packages/spyder/config/base.py", line 212, in get_image_path + return osp.abspath(osp.join(img_path, default)) + UnboundLocalError: local variable 'img_path' referenced before assignment -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1663392 Title: spyder3: UnboundLocalError: local variable 'img_path' referenced before assignment To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/spyder/+bug/1663392/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs