kivy / kivy-designer

UI designer for Kivy - DEPRECATED
https://kivy-designer.readthedocs.io
MIT License
820 stars 209 forks source link

BugReporterApp() parse requirements crashed #283

Open them0ntem opened 7 years ago

them0ntem commented 7 years ago

In kivy-designer KivyConsole() https://github.com/kivy/kivy-designer/blob/master/designer/components/kivy_console.py#L726-L729 change cwd dir to project dir which cause problem in BugReporterApp() to parse requirements https://github.com/kivy/kivy-designer/blob/master/designer/tools/bug_reporter.py#L170-L175

 Traceback (most recent call last):
   File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 174, in _run_module_as_main
     "__main__", fname, loader, pkg_name)
   File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
     exec code in run_globals
   File "/Users/manthansharma/Projects/PycharmProjects/kivy-designer/designer/__main__.py", line 17, in <module>
     main()
   File "/Users/manthansharma/Projects/PycharmProjects/kivy-designer/designer/__main__.py", line 13, in main
     DesignerApp().run()
   File "/Users/manthansharma/virtualenvs/kivy-designer/lib/python2.7/site-packages/kivy/app.py", line 828, in run
     runTouchApp()
   File "/Users/manthansharma/virtualenvs/kivy-designer/lib/python2.7/site-packages/kivy/base.py", line 487, in runTouchApp
     EventLoop.window.mainloop()
   File "/Users/manthansharma/virtualenvs/kivy-designer/lib/python2.7/site-packages/kivy/core/window/window_sdl2.py", line 622, in mainloop
     r = ExceptionManager.handle_exception(inst)
   File "/Users/manthansharma/virtualenvs/kivy-designer/lib/python2.7/site-packages/kivy/base.py", line 86, in handle_exception
     r = handler.handle_exception(inst)
   File "designer/app.py", line 1668, in handle_exception
   File "/Users/manthansharma/virtualenvs/kivy-designer/lib/python2.7/site-packages/kivy/app.py", line 802, in run
     root = self.build()
   File "designer/tools/bug_reporter.py", line 178, in build
   File "/Users/manthansharma/virtualenvs/kivy-designer/lib/python2.7/site-packages/pip/req/req_file.py", line 84, in parse_requirements
     filename, comes_from=comes_from, session=session
   File "/Users/manthansharma/virtualenvs/kivy-designer/lib/python2.7/site-packages/pip/download.py", line 425, in get_file_content
     'Could not open requirements file: %s' % str(exc)
 pip.exceptions.InstallationError: Could not open requirements file: [Errno 2] No such file or directory: '/Users/manthansharma/Library/Application Support/designer/.kivy-designer/new_project/designer/tools/../../requirements.txt'
them0ntem commented 7 years ago

As unit-test runs BugReporterApp() in kivy-designer source dir it passed in test.