PermissionError: [WinError 5] Access is denied: ...
Does this work on windows 10?
After successfully run 'reflex init', and run rf-init I got this error message.
(venv) PS F:\Project\temperature> rf-init
Setting up Reflexify directory...
Source directory created successfully.
Configuring rxconfig.py file...
Traceback (most recent call last):
File "F:\python_3.10.2\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "F:\python_3.10.2\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "F:\Project\temperature\venv\Scripts\rf-init.exe\__main__.py", line 7, in <module>
File "F:\Project\temperature\venv\lib\site-packages\click\core.py", line 1157, in __call__
File "F:\Project\temperature\venv\lib\site-packages\click\core.py", line 1078, in main
File "F:\Project\temperature\venv\lib\site-packages\click\core.py", line 1434, in invoke
File "F:\Project\temperature\venv\lib\site-packages\click\core.py", line 783, in invoke
File "F:\Project\temperature\venv\lib\site-packages\reflexify_scripts\create.py", line 108, in create
File "F:\Project\temperature\venv\lib\site-packages\reflexify_scripts\create.py", line 83, in change_rx_config_details
File "F:\python_3.10.2\lib\shutil.py", line 749, in rmtree
return _rmtree_unsafe(path, onerror)
File "F:\python_3.10.2\lib\shutil.py", line 614, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "F:\python_3.10.2\lib\shutil.py", line 614, in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)
File "F:\python_3.10.2\lib\shutil.py", line 619, in _rmtree_unsafe
onerror(os.unlink, fullname, sys.exc_info())
File "F:\python_3.10.2\lib\shutil.py", line 617, in _rmtree_unsafe
os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'F:\\Project\\temperature\\venv\\Scripts\\python.exe'
It should work across all platforms. Did you try launching the command prompt as admin? There's an option to do so if you right-click CMD.
Restarted the PC, and tried the powershell as admin. After sending the command reflex init, I got the following.
After rf-init, I got this. And all files except my virtual environment folder were wiped out.
It also messed up the python installation in the virtual env.
I also tried to disable the windows security real-time protection (for virus and threat protection), but the same issue is encountered.
On the other hand, I have not tried running it on ubuntu via the WSL (windows subsystem for linux) because my PC had issues running the reflex app.
I see - I'll have to manually install the library on my windows laptop to see if there are any errors.
It's weird that it's deleting the files because that's not part of the script. Also I don't know why it's affecting your Python in the virtual environment. Also, you'll need to make sure the base library, Reflex, is functional because this library won't work if it isn't.
While I check things on windows, you can clone the repo or just download the app directory and replace it with whatever folder was created after reflex init. Or, if you pip install the package, the actual app directory will be available in your venv/lib folder, you can always use that while I try to find a solution.
I'll try to debug this soon and get back to you.
Also, you'll need to make sure the base library,
Reflex, is functional because this library won't work if it isn't.
In windows, reflex is fine. This is why I tried to setup reflexify in windows.
Later I will try your suggestion. Thanks.
This is what I tried.
- Clone the repo.
- cd to reflexify.
- Create venv.
- Activate venv.
- Install reflexify.
- Initialize reflex with
reflex init. - Monitor the config with
python reflexify_scripts/build.py. - Send
reflex run.
And got this at home/start path.
This is cool.
So this is a way to bypass the rf-init command.