reflex-dev / reflex

🕸️ Web apps in pure Python 🐍
https://reflex.dev
Apache License 2.0
19.77k stars 1.14k forks source link

I need help #2850

Closed Gabo2447 closed 6 months ago

Gabo2447 commented 7 months ago
Traceback (most recent call last):
  File "C:\Users\vit\AppData\Local\Programs\Python\Python38-32\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\vit\AppData\Local\Programs\Python\Python38-32\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\vit\Desktop\my_app_name\.venv\Scripts\reflex.exe\__main__.py", line 7, in <module>
  File "c:\users\vit\desktop\my_app_name\.venv\lib\site-packages\typer\main.py", line 328, in __call__
    raise e
  File "c:\users\vit\desktop\my_app_name\.venv\lib\site-packages\typer\main.py", line 311, in __call__
    return get_command(self)(*args, **kwargs)
  File "c:\users\vit\desktop\my_app_name\.venv\lib\site-packages\click\core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "c:\users\vit\desktop\my_app_name\.venv\lib\site-packages\typer\core.py", line 778, in main
    return _main(
  File "c:\users\vit\desktop\my_app_name\.venv\lib\site-packages\typer\core.py", line 216, in _main
    rv = self.invoke(ctx)
  File "c:\users\vit\desktop\my_app_name\.venv\lib\site-packages\click\core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\users\vit\desktop\my_app_name\.venv\lib\site-packages\click\core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\users\vit\desktop\my_app_name\.venv\lib\site-packages\click\core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "c:\users\vit\desktop\my_app_name\.venv\lib\site-packages\typer\main.py", line 683, in wrapper
    return callback(**use_params)  # type: ignore
  File "c:\users\vit\desktop\my_app_name\.venv\lib\site-packages\reflex\reflex.py", line 135, in init
    _init(name, template, loglevel)
  File "c:\users\vit\desktop\my_app_name\.venv\lib\site-packages\reflex\reflex.py", line 103, in _init
    prerequisites.initialize_frontend_dependencies()
  File "c:\users\vit\desktop\my_app_name\.venv\lib\site-packages\reflex\utils\prerequisites.py", line 935, in initialize_frontend_dependencies
    processes.run_concurrently(install_node, install_bun)
  File "c:\users\vit\desktop\my_app_name\.venv\lib\site-packages\reflex\utils\processes.py", line 211, in run_concurrently
    pass
  File "C:\Users\vit\AppData\Local\Programs\Python\Python38-32\lib\contextlib.py", line 120, in __exit__
    next(self.gen)
  File "c:\users\vit\desktop\my_app_name\.venv\lib\site-packages\reflex\utils\processes.py", line 197, in run_concurrently_context
    task.result()
  File "C:\Users\vit\AppData\Local\Programs\Python\Python38-32\lib\concurrent\futures\_base.py", line 437, in result
    return self.__get_result()
  File "C:\Users\vit\AppData\Local\Programs\Python\Python38-32\lib\concurrent\futures\_base.py", line 389, in __get_result
    raise self._exception
  File "C:\Users\vit\AppData\Local\Programs\Python\Python38-32\lib\concurrent\futures\thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "c:\users\vit\desktop\my_app_name\.venv\lib\site-packages\reflex\utils\prerequisites.py", line 654, in install_node
    processes.show_status("Installing node", process)
  File "c:\users\vit\desktop\my_app_name\.venv\lib\site-packages\reflex\utils\processes.py", line 267, in show_status
    for line in stream_logs(message, process):
  File "c:\users\vit\desktop\my_app_name\.venv\lib\site-packages\reflex\utils\processes.py", line 234, in stream_logs
    for line in process.stdout:
  File "C:\Users\vit\AppData\Local\Programs\Python\Python38-32\lib\codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa1 in position 4: invalid start byte
Anga205 commented 7 months ago

hello @Gabo2447 can you please share the following information about your error: which version of reflex are you using? if comfortable, can you share the code snippet that caused this error? or if you aren't sure, can you share the entire code? do you have any information on how this error can be reproduced?

Gabo2447 commented 7 months ago

hello @Gabo2447 can you please share the following information about your error: which version of reflex are you using? if comfortable, can you share the code snippet that caused this error? or if you aren't sure, can you share the entire code? do you have any information on how this error can be reproduced?

Yeah, First I created a Virtual Environment and installed Reflex 0.4.4 and updated the PIP 21 to 24 (Something I forgot to mention is that I always had the Virtual Environment active)

When the PIP update and the installation of Reflex finished (one at a time) I created a folder called test, I went to that folder in CMD and put the command: reflex init When the command was being executed, a menu of options appeared, there were two options, one appeared in parentheses and another option, I hit Enter and I got that error

Gabo2447 commented 7 months ago

I also get a warning from the Node.js Binary

Alek99 commented 7 months ago

What os are you and and what python version

Gabo2447 commented 7 months ago

What os are you and and what python version

1.8.10

cllatser commented 7 months ago

Hello, if you are working with Windows, can you explain to us how you created the venv virtual environment?

c:\users\vit\desktop\my_app_name.venv\lib\site-packages\reflex\reflex.py"

Gabo2447 commented 7 months ago

Hello, if you are working with Windows, can you explain to us how you created the venv virtual environment?

c:\users\vit\desktop\my_app_name.venv\lib\site-packages\reflex\reflex.py"

What I did was go to the folder that I had previously created on the desktop, this one is called PYTHON3_REFLEX, I went to that path using CMD and when I got to the path I entered the following command: Python -m venv venv After the Virtual Environment was created I activated it with the command "venv\scripts\activate"

cllatser commented 7 months ago

OK. Try if you use CMD:

venv\Scripts\activate.bat

Or PowerShell:

venv\Scripts\activate.ps1

If you look in front of your venv, a dot appears and not a slash, I'm almost sure it is some problem with the activation of the venv. I also use Windows:

C:\Users\Carlos Llatser\PycharmProjects\learn_udemy\curso_web\venv\Lib\site-packages\reflex\utils\prerequisites.py

ElijahAhianyo commented 6 months ago

@Gabo2447 can you confirm if the issue persists?

ElijahAhianyo commented 6 months ago

closing this issue now, @Gabo2447 feel free to reopen or open another issue if case you face any issues