posit-dev / publisher

MIT License
3 stars 0 forks source link

In Python when using a route that's not `app` it fails on Connect #2178

Open kgartland-rstudio opened 2 weeks ago

kgartland-rstudio commented 2 weeks ago

We don't offer a way for the user to set a route in the config file for python apps. Though it's common to use app as the route, in practice a user can set it to whatever they'd like.

In Connect if a user decided to use a different route, this error is thrown:

Error while loading Python API: Failed to find an application object (('app', 'application')) or factory function (('create_app', 'make_app')) in module 'app'. You can specify a different entrypoint in the manifest.json file or on the rsconnect-python command line.

We should probably update Connect to throw a new error but also should allow the user to add route to the config file. I think it should be included by default with app as the default route.

To reproduce, just change all app references to another string in the fastapi-simple app.

dotNomad commented 2 weeks ago

We need to add a configuration field for the object name.