h2oai / wave

Realtime Web Apps and Dashboards for Python and R
https://wave.h2o.ai
Apache License 2.0
3.9k stars 323 forks source link

App won't run if it's name is provided in a relative form #2160

Closed AWRDev closed 8 months ago

AWRDev commented 8 months ago

Wave SDK Version, OS

h2o-wave==0.26.3, Windows 10 build 19044

Actual behavior

App won't run if the path provided like ./app.py (Happens while using Terminal's Tab-autocomplete). Makes things inconvinient

Expected behavior

App runs independently of way how application name is provided: "app.py" or ".\app.py", etc.

Steps To Reproduce

  1. Open terminal
  2. Run wave run .\app.py
  3. See error message TypeError: the 'package' argument is required to perform a relative import for './app'
mturoci commented 8 months ago

Thanks for the suggestion @AWRDev! The solution should be just a simple prefix trimming.