1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Permission Error: [Errno 1] Operation Not permitted

Discussão em 'Python' iniciado por Stack, Setembro 13, 2024.

  1. Stack

    Stack Membro Participativo

    I am trying to add some .txt files to my code in pyinstaller, but when I do pyinstaller maze.spec, I am getting a permission error. I thought a simple sudo would fix it, but i am still getting the error.... Any Idea on what could be wrong?

    Here is my error btw

    Traceback (most recent call last):
    File "/Library/Frameworks/Python.framework/Versions/3.8/bin/pyinstaller", line 8, in <module>
    sys.exit(run())
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/__main__.py", line 112, in run
    run_build(pyi_config, spec_file, **vars(args))
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/__main__.py", line 63, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/building/build_main.py", line 732, in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/building/build_main.py", line 679, in build
    exec(code, spec_namespace)
    File "maze.spec", line 20, in <module>
    exe = EXE(pyz,
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/building/api.py", line 443, in __init__
    self.__postinit__()
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/building/datastruct.py", line 158, in __postinit__
    self.assemble()
    File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PyInstaller/building/api.py", line 520, in assemble
    os.remove(self.name)
    PermissionError: [Errno 1] Operation not permitted: '/Users/jr194/Bit Club/Test Cases/Maze_Solver_Stack/dist/maze'


    Also, I have checked the permissions on the maze folder, and it seems that I have rwr permissions for the user, which I am sure means I am allowed to read and write in it. So i honestly am stumped on this behavior.

    Continue reading...

Compartilhe esta Página