danielgatis / rembg

Rembg is a tool to remove images background
MIT License
16.48k stars 1.84k forks source link

[BUG] Permission error despite running on elevated permissions. (ONNX runtime error: 13) #477

Closed Potato22 closed 1 year ago

Potato22 commented 1 year ago

Describe the bug ONNX returns permission error despite being run on an elevated process (Administrator)

To Reproduce Steps to reproduce the behavior:

  1. init and use rembg like usual.
  2. wait.
  3. see permission error: onnxruntime.capi.onnxruntime_pybind11_state.Fail: [ONNXRuntimeError] : 1 : FAIL : Load model from C:\Users\potat\.u2net\u2net.onnx failed:system error number 13

Expected behavior rembg or ONNX should be able to read the path just fine.

Images image

OS Version: Windows 11 Pro for Workstations 22H2 22631.1900

Rembg version: rembg, version 2.0.47

Additional context

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale.

antscribano commented 11 months ago

Similar error here after trying to install onnxruntime.

ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: 'C:\Users\anton\AppData\Local\Programs\Python\Python311\Lib\site-packages\sympy\plotting\tests\test_region_and.png'

So I uninstalled rembg, Python, deleted any Python folder and tried to reinstall everything from scratch (while also clearing cache).

Now I can't event reinstall rembg

image

Also tried to reinstall sympy (4.1.0) with no luck and clear cache.

Running cmd as Admin. Windows 11 Pro 22631.2506 + Python 3.11.6

Please let me know if you prefer I open a brand new bug issue.

Thank you