Skip to content

relative import in streamlit: need to run from generation folder #138

@enryH

Description

@enryH

Similarly to #135 and it's addressing in #136 (and #137 potentially as an option to specify absolute paths), streamlit reports are strictly w.r.t to the location the streamlit report was generated from (either using a config or the directory option). Going somewhere else and invocing the report_manager.py file, will not display the contents as expected:

FileNotFoundError: [Errno 2] No such file or directory: 'docs/example_data/Basic_example_vuegen_demo_notebook/description.md'
  • can be fixed by saving the report generation location and using that information in file paths
  • in case stricly relative imports are needed (deploying streamlit apps, the rationale for this design), we can check if the folder exist and otherwise try to continue with only relative paths if that folder is not present - issuing a warning in the logs)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions