Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSError: [WinError 123] Invalid name: '/tmp\\*' #86

Open
max-tet opened this issue Mar 29, 2020 · 5 comments
Open

OSError: [WinError 123] Invalid name: '/tmp\\*' #86

max-tet opened this issue Mar 29, 2020 · 5 comments

Comments

@max-tet
Copy link

max-tet commented Mar 29, 2020

I am seeing this error when running docker-pyinstaller as part of a Gilab CI build script. When running it locally, it works without problems.

This is the CI job:

    stage: build_exec
    image: python:3.8-buster
    script:
        - apt update
        - apt -y install apt-transport-https ca-certificates curl gnupg2 software-properties-common
        - curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
        - add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
        - apt update
        - apt -y install docker-ce docker-ce-cli containerd.io
        - cd src/backend
        - pip install virtualenv
        - virtualenv --python=python3 venv
        - source venv/bin/activate
        - pip install .
        - pip freeze > requirements.txt
        - echo "$(pwd)"
        - ls
        - docker run -v "$(pwd):/src/" cdrx/pyinstaller-windows
    tags:
        - linux
        - dind
    artifacts:
        name: terminal_desktop_win
        paths:
            - src/backend/dist/windows/main.exe
        expire_in: 1d

The Gitlab runner is my own local dev machine and I configured it with volumes = ["/cache","/var/run/docker.sock:/var/run/docker.sock"], so the python:3.8-buster container should be able to use the docker socket and spin up the cdrx/pyinstaller-windows container as a sibling.
Still, this is the result.

$ docker run -v "$(pwd):/src/" cdrx/pyinstaller-windows
537 INFO: PyInstaller: 3.6
538 INFO: Python: 3.7.5
538 INFO: Platform: Windows-7-6.1.7601-SP1
558 INFO: UPX is not available.
559 INFO: Removing temporary files and cleaning cache in C:\users\root\Application Data\pyinstaller
Traceback (most recent call last):
  File "c:\Python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\Python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Python37\Scripts\pyinstaller.exe\__main__.py", line 7, in <module>
  File "c:\Python37\lib\site-packages\PyInstaller\__main__.py", line 114, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "c:\Python37\lib\site-packages\PyInstaller\__main__.py", line 65, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "c:\Python37\lib\site-packages\PyInstaller\building\build_main.py", line 734, in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
  File "c:\Python37\lib\site-packages\PyInstaller\building\build_main.py", line 636, in build
    os.makedirs(pth)
  File "c:\Python37\lib\os.py", line 221, in makedirs
    mkdir(name, mode)
OSError: [WinError 123] Invalid name: '/tmp\\*'

I made sure that the spec file is in the CWD as suggested in this ticket. I also tried adding :Z to the volume.

@DanielKrolopp
Copy link

I'm having the same issue, even when running this locally. I also have tried the the spec file as suggested in max-tet's ticket.

@m0ngr31
Copy link

m0ngr31 commented Sep 1, 2020

I had this same issue. Turns out it was mapping directories wrong. I had it running inside of another docker container and it needed the paths for the host directory, not the paths for the container.

@pwyq
Copy link

pwyq commented Dec 7, 2020

got same problem running on Windows and Ubuntu

@nono313
Copy link

nono313 commented Aug 17, 2022

Any news on this issue ? I am getting the same with Docker Desktop on Windows 10

@liyujun-dev
Copy link

The same issue in JackMcKew/pyinstaller-action-windows#3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants