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

Investigate win failures #6351

Closed

Conversation

nicoddemus
Copy link
Member

No description provided.

@nicoddemus
Copy link
Member Author

nicoddemus commented Dec 16, 2019

Strange, the failure is happening due to some atexit-registered function raising an exception:

Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "d:\a\1\s\.tox\py37-twisted-numpy\lib\ntpath.py", line 562, in relpath
    path_drive, start_drive))
ValueError: path is on mount 'D:', start on mount 'C:'

I've commented the only place where pytest registers a function, but the error still happens. I suspect this is caused because the project is cloned and executed from D:, but the temporary directory is located in C:... not sure what else to try though, ideas welcome.

@asottile
Copy link
Member

the python 2 failure seems to be much more helpful:

E         -  'Traceback (most recent call last):',
E         -  '  File "C:\\hostedtoolcache\\windows\\Python\\2.7.16\\x64\\Lib\\atexit.py", line 24, in _run_exitfuncs',
E         -  '    func(*targs, **kargs)',
E         -  '  File "d:\\a\\1\\s\\.tox\\py27-lsof-nobyte-numpy\\lib\\site-packages\\coverage\\control.py", line 525, in _atexit',
E         -  '    self.stop()',
E         -  '  File "d:\\a\\1\\s\\.tox\\py27-lsof-nobyte-numpy\\lib\\site-packages\\coverage\\control.py", line 613, in save',
E         -  '    data = self.get_data()',
E         -  '  File "d:\\a\\1\\s\\.tox\\py27-lsof-nobyte-numpy\\lib\\site-packages\\coverage\\control.py", line 667, in get_data',
E         -  '    if self._collector and self._collector.flush_data():',
E         -  '  File "d:\\a\\1\\s\\.tox\\py27-lsof-nobyte-numpy\\lib\\site-packages\\coverage\\collector.py", line 427, in flush_data',
E         -  '    self.covdata.add_arcs(self.mapped_file_dict(self.data))',
E         -  '  File "d:\\a\\1\\s\\.tox\\py27-lsof-nobyte-numpy\\lib\\site-packages\\coverage\\sqldata.py", line 468, in add_arcs',
E         -  '    self._choose_lines_or_arcs(arcs=True)',
E         -  '  File "d:\\a\\1\\s\\.tox\\py27-lsof-nobyte-numpy\\lib\\site-packages\\coverage\\sqldata.py", line 493, in _choose_lines_or_arcs',
E         -  '    with self._connect() as con:',
E         -  '  File "d:\\a\\1\\s\\.tox\\py27-lsof-nobyte-numpy\\lib\\site-packages\\coverage\\sqldata.py", line 298, in _connect',
E         -  '    self._create_db()',
E         -  '  File "d:\\a\\1\\s\\.tox\\py27-lsof-nobyte-numpy\\lib\\site-packages\\coverage\\sqldata.py", line 247, in _create_db',
E         -  '    with db:',
E         -  '  File "d:\\a\\1\\s\\.tox\\py27-lsof-nobyte-numpy\\lib\\site-packages\\coverage\\sqldata.py", line 1008, in __enter__',
E         -  '    self._connect()',
E         -  '  File "d:\\a\\1\\s\\.tox\\py27-lsof-nobyte-numpy\\lib\\site-packages\\coverage\\sqldata.py", line 982, in _connect',
E         -  '    filename = os.path.relpath(self.filename)',
E         -  '  File "d:\\a\\1\\s\\.tox\\py27-lsof-nobyte-numpy\\lib\\ntpath.py", line 529, in relpath',
E         -  '    % (path_prefix, start_prefix))',
E         -  'ValueError: path is on drive D:, start on drive c:']

@asottile
Copy link
Member

here's the issue in coveragepy: nedbat/coveragepy#895

@nicoddemus
Copy link
Member Author

Awesome, thanks @asottile (and @nedbat for the fix)!

Closing this, should be fixed after next coverage release. 👍

@nicoddemus nicoddemus closed this Dec 19, 2019
@nicoddemus nicoddemus deleted the investigate-win-failures branch December 19, 2019 23:38
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

Successfully merging this pull request may close these issues.

2 participants