[INTPAK-74] Can't run tox twice in a row Created: 18/Nov/17  Updated: 16/Jan/18  Resolved: 16/Jan/18

Status: Closed
Project: integration-packaging
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Lowest
Reporter: Daniel Farrell Assignee: Daniel Farrell
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

If I run tox twice in a row, the second run fails with:

  • Install prebuilt node (8.6.0) ....Traceback (most recent call last):
    File "/home/daniel/packaging/.tox/coala/lib/python3.5/site-packages/nodeenv.py", line 573, in copytree
    shutil.copytree(s, d, symlinks, ignore)
    File "/home/daniel/packaging/.tox/coala/lib64/python3.5/shutil.py", line 315, in copytree
    os.makedirs(dst)
    File "/home/daniel/packaging/.tox/coala/lib64/python3.5/os.py", line 241, in makedirs
    mkdir(name, mode)
    FileExistsError: [Errno 17] File exists: '/home/daniel/packaging/.tox/coala/bin'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/daniel/packaging/.tox/coala/bin/nodeenv", line 11, in <module>
sys.exit(main())
File "/home/daniel/packaging/.tox/coala/lib/python3.5/site-packages/nodeenv.py", line 1060, in main
create_environment(env_dir, opt)
File "/home/daniel/packaging/.tox/coala/lib/python3.5/site-packages/nodeenv.py", line 891, in create_environment
install_node(env_dir, src_dir, opt)
File "/home/daniel/packaging/.tox/coala/lib/python3.5/site-packages/nodeenv.py", line 692, in install_node
copy_node_from_prebuilt(env_dir, src_dir, opt.node)
File "/home/daniel/packaging/.tox/coala/lib/python3.5/site-packages/nodeenv.py", line 603, in copy_node_from_prebuilt
copytree(src_folder, env_dir, True)
File "/home/daniel/packaging/.tox/coala/lib/python3.5/site-packages/nodeenv.py", line 575, in copytree
copytree(s, d, symlinks, ignore)
File "/home/daniel/packaging/.tox/coala/lib/python3.5/site-packages/nodeenv.py", line 578, in copytree
os.symlink(os.readlink(s), d)
FileExistsError: [Errno 17] File exists: '../lib/node_modules/npm/bin/npx-cli.js' -> '/home/daniel/packaging/.tox/coala/bin/npx'
ERROR: InvocationError: '/home/daniel/packaging/.tox/coala/bin/nodeenv -p'

I can clear it up by removing the offending file (`rm -rf .tox`), but didn't used to have to do this. zxiiro says a project fixed this recently by pinning a version, maybe node version, maybe docs project.

Imported from Trello



 Comments   
Comment by Thanh Ha (zxiiro) [ 28/Nov/17 ]

For the record the docs project pins nodeenv to 1.1.2

Comment by Daniel Farrell [ 15/Jan/18 ]

For int/pack repo: https://git.opendaylight.org/gerrit/#/c/67178/

Comment by Daniel Farrell [ 15/Jan/18 ]

Puppet: https://git.opendaylight.org/gerrit/#/c/67180/

Comment by Daniel Farrell [ 15/Jan/18 ]

Ansible: https://git.opendaylight.org/gerrit/#/c/67181/

Generated at Wed Feb 07 20:03:31 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.