brianrobt

Untitled

Jul 19th, 2024
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 7.38 KB | Source Code | 0 0
  1. =========================================================================================================================== FAILURES ===========================================================================================================================
  2. _________________________________________________________________________________________________________________________ test_pandas __________________________________________________________________________________________________________________________
  3.  
  4. datafiles = PosixPath('/tmp/pytest-of-brian/pytest-0/test_pandas0')
  5.  
  6.     @pytest.mark.datafiles(SAMPLES_DIR / "pandas")
  7.     def test_pandas(datafiles: Path) -> None:
  8.         """Test that the pandas/numpy is working correctly."""
  9.         output = run_command(datafiles, "python setup.py build_exe -O2")
  10.         executable = datafiles / BUILD_EXE_DIR / f"test_pandas{EXE_SUFFIX}"
  11.         assert executable.is_file()
  12.  
  13. >       output = run_command(datafiles, executable, timeout=10)
  14.  
  15. tests/test_hooks_pandas.py:26:
  16. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  17. tests/generate_samples.py:525: in run_command
  18.     return check_output(
  19. /usr/lib/python3.12/subprocess.py:466: in check_output
  20.     return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  21. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  22.  
  23. input = None, capture_output = False, timeout = 10, check = True, popenargs = (['/tmp/pytest-of-brian/pytest-0/test_pandas0/build/exe.linux-x86_64-3.12/test_pandas'],)
  24. kwargs = {'cwd': '/tmp/pytest-of-brian/pytest-0/test_pandas0', 'stdout': -1, 'text': True}, process = <Popen: returncode: 255 args: ['/tmp/pytest-of-brian/pytest-0/test_pandas0/b...>, stdout = '', stderr = None, retcode = 255
  25.  
  26.    def run(*popenargs,
  27.            input=None, capture_output=False, timeout=None, check=False, **kwargs):
  28.        """Run command with arguments and return a CompletedProcess instance.
  29.  
  30.        The returned instance will have attributes args, returncode, stdout and
  31.        stderr. By default, stdout and stderr are not captured, and those attributes
  32.        will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
  33.        or pass capture_output=True to capture both.
  34.  
  35.        If check is True and the exit code was non-zero, it raises a
  36.        CalledProcessError. The CalledProcessError object will have the return code
  37.        in the returncode attribute, and output & stderr attributes if those streams
  38.        were captured.
  39.  
  40.        If timeout is given, and the process takes too long, a TimeoutExpired
  41.        exception will be raised.
  42.  
  43.        There is an optional argument "input", allowing you to
  44.        pass bytes or a string to the subprocess's stdin.  If you use this argument
  45.         you may not also use the Popen constructor's "stdin" argument, as
  46.        it will be used internally.
  47.  
  48.        By default, all communication is in bytes, and therefore any "input" should
  49.        be bytes, and the stdout and stderr will be bytes. If in text mode, any
  50.        "input" should be a string, and stdout and stderr will be strings decoded
  51.        according to locale encoding, or by "encoding" if set. Text mode is
  52.        triggered by setting any of text, encoding, errors or universal_newlines.
  53.  
  54.        The other arguments are the same as for the Popen constructor.
  55.        """
  56.        if input is not None:
  57.            if kwargs.get('stdin') is not None:
  58.                raise ValueError('stdin and input arguments may not both be used.')
  59.            kwargs['stdin'] = PIPE
  60.  
  61.        if capture_output:
  62.            if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
  63.                raise ValueError('stdout and stderr arguments may not be used '
  64.                                 'with capture_output.')
  65.            kwargs['stdout'] = PIPE
  66.            kwargs['stderr'] = PIPE
  67.  
  68.        with Popen(*popenargs, **kwargs) as process:
  69.            try:
  70.                stdout, stderr = process.communicate(input, timeout=timeout)
  71.            except TimeoutExpired as exc:
  72.                process.kill()
  73.                if _mswindows:
  74.                    # Windows accumulates the output in a single blocking
  75.                    # read() call run on child threads, with the timeout
  76.                    # being done in a join() on those threads.  communicate()
  77.                    # _after_ kill() is required to collect that and add it
  78.                    # to the exception.
  79.                    exc.stdout, exc.stderr = process.communicate()
  80.                else:
  81.                    # POSIX _communicate already populated the output so
  82.                    # far into the TimeoutExpired exception.
  83.                    process.wait()
  84.                raise
  85.            except:  # Including KeyboardInterrupt, communicate handled that.
  86.                process.kill()
  87.                # We don't call process.wait() as .__exit__ does that for us.
  88.                 raise
  89.             retcode = process.poll()
  90.             if check and retcode:
  91. >               raise CalledProcessError(retcode, process.args,
  92.                                          output=stdout, stderr=stderr)
  93. E               subprocess.CalledProcessError: Command '['/tmp/pytest-of-brian/pytest-0/test_pandas0/build/exe.linux-x86_64-3.12/test_pandas']' returned non-zero exit status 255.
  94.  
  95. /usr/lib/python3.12/subprocess.py:571: CalledProcessError
  96. --------------------------------------------------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------------------------------------------------
  97. Traceback (most recent call last):
  98.   File "/home/brian/workspace/python-cx-freeze/src/cx_Freeze-7.2.0/test_dir/usr/lib/python3.12/site-packages/cx_Freeze/initscripts/__startup__.py", line 141, in run
  99.     module_init.run(name + "__main__")
  100.   File "/home/brian/workspace/python-cx-freeze/src/cx_Freeze-7.2.0/test_dir/usr/lib/python3.12/site-packages/cx_Freeze/initscripts/console.py", line 25, in run
  101.     exec(code, main_globals)
  102.   File "test_pandas.py", line 4, in <module>
  103.     import pandas as pd
  104.   File "/usr/lib/python3.12/site-packages/pandas/__init__.py", line 49, in <module>
  105.     from pandas.core.api import (
  106.   File "/usr/lib/python3.12/site-packages/pandas/core/api.py", line 47, in <module>
  107.     from pandas.core.groupby import (
  108.   File "/usr/lib/python3.12/site-packages/pandas/core/groupby/__init__.py", line 1, in <module>
  109.     from pandas.core.groupby.generic import (
  110.   File "/usr/lib/python3.12/site-packages/pandas/core/groupby/generic.py", line 73, in <module>
  111.     from pandas.core.groupby.groupby import (
  112.   File "/usr/lib/python3.12/site-packages/pandas/core/groupby/groupby.py", line 124, in <module>
  113.     from pandas.core.groupby import (
  114. ImportError: cannot import name 'numba_' from partially initialized module 'pandas.core.groupby' (most likely due to a circular import) (/tmp/pytest-of-brian/pytest-0/test_pandas0/build/exe.linux-x86_64-3.12/lib/pandas/core/groupby/__init__.pyc)
Advertisement
Add Comment
Please, Sign In to add comment