You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an app is misconfigured and <app_name>.__main__ cannot be executed, the stub app fails almost silently.
Steps to reproduce
Generate a fresh "hello world" app
Delete the src/helloworld directory
Create an empty text file named src/helloworld
briefcase run
See error
[helloworld] Starting app...
===========================================================================
TypeError: 'str' object cannot be interpreted as an integer` error.
A similar error is raised if you delete the __main__.py file (which should generate an ImportError: No module named helloworld.__main__; 'helloworld' is a package and cannot be directly executed error).
However, if you delete app.py, the app correctly generates an error dialog. This may be because it is reported as ModuleNotFoundError: No module named 'helloworld.app', rather than an ImportError.
Expected behavior
An error message similar to the one raised by briefcase dev should be displayed.
[helloworld] Starting in dev mode...
===========================================================================
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "<frozen runpy>", line 222, in run_module
File "<frozen runpy>", line 142, in _get_module_details
ImportError: No module named helloworld
Problem running app helloworld.
Describe the bug
If an app is misconfigured and
<app_name>.__main__
cannot be executed, the stub app fails almost silently.Steps to reproduce
src/helloworld
directorysrc/helloworld
briefcase run
A similar error is raised if you delete the
__main__.py
file (which should generate anImportError: No module named helloworld.__main__; 'helloworld' is a package and cannot be directly executed
error).However, if you delete
app.py
, the app correctly generates an error dialog. This may be because it is reported asModuleNotFoundError: No module named 'helloworld.app'
, rather than an ImportError.Expected behavior
An error message similar to the one raised by
briefcase dev
should be displayed.Screenshots
No response
Environment
Logs
Additional context
Originally reported as beeware/briefcase#2123, using a linux system backend.
The text was updated successfully, but these errors were encountered: