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
Describe the bug
Due to new telemetry routines, Reflex crashes when trying reflex run --backend-only if the project does not have a .web directory.
To Reproduce
reflex init --template blankrm -rf .webreflex run --backend-only
Expected behavior
Reflex backend starts normally, with or without the reflex.json file present.
Screenshots
(VENV-pre-0.4.5a) masen@asmbp21 reflex-dev % reflex run --backend-only───────────────────────────── Starting Reflex App ──────────────────────────────Traceback (most recent call last): File "/Users/masen/code/reflex-dev/VENV-pre-0.4.5a/bin/reflex", line 8, in <module> sys.exit(cli()) ^^^^^ File "/Users/masen/code/reflex-dev/VENV-pre-0.4.5a/lib/python3.12/site-packages/typer/main.py", line 328, in __call__ raise e File "/Users/masen/code/reflex-dev/VENV-pre-0.4.5a/lib/python3.12/site-packages/typer/main.py", line 311, in __call__ return get_command(self)(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/masen/code/reflex-dev/VENV-pre-0.4.5a/lib/python3.12/site-packages/click/core.py", line 1157, in __call__ return self.main(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/masen/code/reflex-dev/VENV-pre-0.4.5a/lib/python3.12/site-packages/typer/core.py", line 778, in main return _main( ^^^^^^ File "/Users/masen/code/reflex-dev/VENV-pre-0.4.5a/lib/python3.12/site-packages/typer/core.py", line 216, in _main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "/Users/masen/code/reflex-dev/VENV-pre-0.4.5a/lib/python3.12/site-packages/click/core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/masen/code/reflex-dev/VENV-pre-0.4.5a/lib/python3.12/site-packages/click/core.py", line 1434, in invoke return ctx.invoke(self.callback, **ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/masen/code/reflex-dev/VENV-pre-0.4.5a/lib/python3.12/site-packages/click/core.py", line 783, in invoke return __callback(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/masen/code/reflex-dev/VENV-pre-0.4.5a/lib/python3.12/site-packages/typer/main.py", line 683, in wrapper return callback(**use_params) # type: ignore ^^^^^^^^^^^^^^^^^^^^^^ File "/Users/masen/code/reflex-dev/VENV-pre-0.4.5a/lib/python3.12/site-packages/reflex/reflex.py", line 262, in run _run(env, frontend, backend, frontend_port, backend_port, backend_host, loglevel) File "/Users/masen/code/reflex-dev/VENV-pre-0.4.5a/lib/python3.12/site-packages/reflex/reflex.py", line 215, in _run telemetry.send(f"run-{env.value}") File "/Users/masen/code/reflex-dev/VENV-pre-0.4.5a/lib/python3.12/site-packages/reflex/utils/telemetry.py", line 129, in send event_data = _prepare_event(event) ^^^^^^^^^^^^^^^^^^^^^ File "/Users/masen/code/reflex-dev/VENV-pre-0.4.5a/lib/python3.12/site-packages/reflex/utils/telemetry.py", line 77, in _prepare_event project_hash = get_project_hash(raise_on_fail=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/masen/code/reflex-dev/VENV-pre-0.4.5a/lib/python3.12/site-packages/reflex/utils/prerequisites.py", line 449, in get_project_hash with open(constants.Reflex.JSON, "r") as file: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^FileNotFoundError: [Errno 2] No such file or directory: '.web/reflex.json'
Specifics (please complete the following information):
The text was updated successfully, but these errors were encountered:
masenf
changed the title
0.4.5a1: Cannot run --backend-only without a .web directory
[REF-2256] 0.4.5a1: Cannot run --backend-only without a .web directory
Mar 19, 2024
Describe the bug
Due to new telemetry routines, Reflex crashes when trying
reflex run --backend-only
if the project does not have a.web
directory.To Reproduce
Expected behavior
Reflex backend starts normally, with or without the reflex.json file present.
Screenshots
Specifics (please complete the following information):
Additional context
Seems related to #2786
Workaround is to disable telemetry with TELEMETRY_ENABLED=false
REF-2256
The text was updated successfully, but these errors were encountered: