Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 655982 Details for
Bug 738454
dev-python/tikzplotlib-0.9.1 fails tests
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
build.log
build.log (text/plain), 368.02 KB, created by
Agostino Sarubbo
on 2020-08-21 18:17:09 UTC
(
hide
)
Description:
build.log
Filename:
MIME Type:
Creator:
Agostino Sarubbo
Created:
2020-08-21 18:17:09 UTC
Size:
368.02 KB
patch
obsolete
> * Package: dev-python/tikzplotlib-0.9.1 > * Repository: gentoo > * Maintainer: sci@gentoo.org > * USE: abi_x86_64 amd64 elibc_glibc kernel_linux python_targets_python3_7 test userland_GNU > * FEATURES: network-sandbox preserve-libs sandbox test userpriv usersandbox > > >@@@@@ PLEASE PAY ATTENTION HERE!!! @@@@@ >This information may help you to understand if this is a duplicate or if this bug exists after you pushed a fix; >This ebuild was merged at the following commit: >https://github.com/gentoo-mirror/gentoo/commit/e40a634b3ef6edfc274e5053568477662e733e6a (Fri Aug 21 14:37:35 UTC 2020) >@@@@@ END @@@@@ > > > >emerge --info: >Portage 3.0.4 (python 3.7.9-final-0, default/linux/amd64/17.1, gcc-10.2.0, glibc-2.32, 5.4.0-1021-aws x86_64) >================================================================= >System uname: Linux-5.4.0-1021-aws-x86_64-Intel-R-_Xeon-R-_Platinum_8175M_CPU_@_2.50GHz-with-gentoo-2.7 >KiB Mem: 64359960 total, 40878564 free >KiB Swap: 0 total, 0 free >Timestamp of repository gentoo: Fri, 21 Aug 2020 14:37:34 +0000 >sh bash 5.0_p18 >ld GNU ld (Gentoo 2.34 p6) 2.34.0 >app-shells/bash: 5.0_p18::gentoo >dev-lang/perl: 5.30.3-r1::gentoo >dev-lang/python: 2.7.18-r1::gentoo, 3.7.9::gentoo, 3.8.5::gentoo, 3.9.0_rc1::gentoo >dev-util/cmake: 3.18.1::gentoo >sys-apps/baselayout: 2.7::gentoo >sys-apps/openrc: 0.42.1::gentoo >sys-apps/sandbox: 2.20::gentoo >sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r5::gentoo >sys-devel/automake: 1.16.2::gentoo >sys-devel/binutils: 2.34-r2::gentoo >sys-devel/gcc: 10.2.0::gentoo >sys-devel/gcc-config: 2.3.1::gentoo >sys-devel/libtool: 2.4.6-r6::gentoo >sys-devel/make: 4.3::gentoo >sys-kernel/linux-headers: 5.8::gentoo (virtual/os-headers) >sys-libs/glibc: 2.32::gentoo >Repositories: > >gentoo > location: /usr/portage > sync-type: rsync > sync-uri: rsync://rsync.gentoo.org/gentoo-portage > priority: -1000 > sync-rsync-verify-metamanifest: yes > sync-rsync-verify-jobs: 1 > sync-rsync-extra-opts: > sync-rsync-verify-max-age: 24 > >ACCEPT_KEYWORDS="amd64 ~amd64" >ACCEPT_LICENSE="* MIT" >CBUILD="x86_64-pc-linux-gnu" >CC="x86_64-pc-linux-gnu-clang" >CFLAGS="-O2 -pipe -march=native -frecord-gcc-switches -fno-diagnostics-color" >CHOST="x86_64-pc-linux-gnu" >CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" >CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" >CXX="x86_64-pc-linux-gnu-clang++" >CXXFLAGS="-O2 -pipe -march=native -frecord-gcc-switches -fno-diagnostics-color" >DISTDIR="/var/tmp/portage/dev-python/tikzplotlib-0.9.1/distdir" >EMERGE_DEFAULT_OPTS="--with-bdeps=y -1 -b -k" >ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" >FCFLAGS="-O2 -pipe -march=native -frecord-gcc-switches -fno-diagnostics-color" >FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms sign split-log strict test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" >FFLAGS="-O2 -pipe -march=native -frecord-gcc-switches -fno-diagnostics-color" >GENTOO_MIRRORS="http://distfiles.gentoo.org" >LANG="C.UTF-8" >LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -fuse-ld=lld" >MAKEOPTS="-j16 V=1" >PKGDIR="/root/.packages" >PORTAGE_CONFIGROOT="/" >PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" >PORTAGE_TMPDIR="/var/tmp" >USE="acl amd64 berkdb bzip2 cli crypt dri elogind fortran gdbm iconv ipv6 jumbo-build libglvnd libtirpc multilib native-symlinks ncurses nls nptl openmp pam pcre readline seccomp split-usr ssl tcpd test unicode xattr zlib" ABI_X86="64" ELIBC="glibc" KERNEL="linux" PYTHON_TARGETS="python3_7" USERLAND="GNU" >Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS > > > >>>> Unpacking source... >>>> Unpacking tikzplotlib-0.9.1.tar.gz to /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work >>>> Source unpacked in /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work >>>> Preparing source in /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1 ... >>>> Source prepared. >>>> Configuring source in /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1 ... >>>> Source configured. >>>> Compiling source in /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1 ... > * python3_7: running distutils-r1_run_phase distutils-r1_python_compile >python3.7 setup.py build -j 16 >running build >running build_py >creating /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib >copying tikzplotlib/__init__.py -> /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib >copying tikzplotlib/_path.py -> /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib >copying tikzplotlib/__about__.py -> /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib >copying tikzplotlib/_hatches.py -> /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib >copying tikzplotlib/_image.py -> /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib >copying tikzplotlib/_markers.py -> /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib >copying tikzplotlib/_patch.py -> /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib >copying tikzplotlib/_cleanfigure.py -> /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib >copying tikzplotlib/_text.py -> /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib >copying tikzplotlib/_legend.py -> /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib >copying tikzplotlib/_axes.py -> /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib >copying tikzplotlib/_color.py -> /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib >copying tikzplotlib/_line2d.py -> /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib >copying tikzplotlib/_util.py -> /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib >copying tikzplotlib/_files.py -> /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib >copying tikzplotlib/_quadmesh.py -> /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib >copying tikzplotlib/_save.py -> /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib >warning: build_py: byte-compiling is disabled, skipping. > > * Using python3.7 in global scope > * python3_7: running distutils-r1_run_phase python_compile_all >>>> Source compiled. >>>> Test phase: dev-python/tikzplotlib-0.9.1 > * python3_7: running distutils-r1_run_phase python_test > * Scanning for an open DISPLAY to start Xvfb ... > * Starting Xvfb on $DISPLAY=2 ... >============================= test session starts ============================== >platform linux -- Python 3.7.9, pytest-6.0.1, py-1.9.0, pluggy-0.13.1 -- /usr/bin/python3.7 >cachedir: .pytest_cache >rootdir: /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1 >collecting ... collected 93 items > >test/test_annotate.py::test FAILED [ 1%] >test/test_axvline.py::test FAILED [ 2%] >test/test_barchart.py::test FAILED [ 3%] >test/test_barchart_errorbars.py::test FAILED [ 4%] >test/test_barchart_legend.py::test FAILED [ 5%] >test/test_basic_sin.py::test FAILED [ 6%] >test/test_boxplot.py::test FAILED [ 7%] >test/test_cleanfigure.py::Test_plottypes::test_plot PASSED [ 8%] >test/test_cleanfigure.py::Test_plottypes::test_step PASSED [ 9%] >test/test_cleanfigure.py::Test_plottypes::test_scatter FAILED [ 10%] >test/test_cleanfigure.py::Test_plottypes::test_bar PASSED [ 11%] >test/test_cleanfigure.py::Test_plottypes::test_hist PASSED [ 12%] >test/test_cleanfigure.py::Test_plottypes::test_plot3d PASSED [ 13%] >test/test_cleanfigure.py::Test_plottypes::test_scatter3d FAILED [ 15%] >test/test_cleanfigure.py::Test_plottypes::test_wireframe3D PASSED [ 16%] >test/test_cleanfigure.py::Test_plottypes::test_surface3D PASSED [ 17%] >test/test_cleanfigure.py::Test_plottypes::test_trisurface3D PASSED [ 18%] >test/test_cleanfigure.py::Test_plottypes::test_contour3D PASSED [ 19%] >test/test_cleanfigure.py::Test_plottypes::test_polygon3D PASSED [ 20%] >test/test_cleanfigure.py::Test_plottypes::test_bar3D PASSED [ 21%] >test/test_cleanfigure.py::Test_plottypes::test_quiver3D PASSED [ 22%] >test/test_cleanfigure.py::Test_plottypes::test_2D_in_3D PASSED [ 23%] >test/test_cleanfigure.py::Test_lineplot_markers::test_line_no_markers PASSED [ 24%] >test/test_cleanfigure.py::Test_lineplot_markers::test_no_line_markers PASSED [ 25%] >test/test_cleanfigure.py::Test_lineplot_markers::test_line_markers PASSED [ 26%] >test/test_cleanfigure.py::Test_lineplot_markers::test_sine PASSED [ 27%] >test/test_cleanfigure.py::Test_subplots::test_subplot PASSED [ 29%] >test/test_cleanfigure.py::test_memory PASSED [ 30%] >test/test_colorbars.py::test FAILED [ 31%] >test/test_contourf.py::test FAILED [ 32%] >test/test_custom_collection.py::test FAILED [ 33%] >test/test_datetime.py::test FAILED [ 34%] >test/test_datetime_paths.py::test FAILED [ 35%] >test/test_deterministic_output.py::test PASSED [ 36%] >test/test_dual_axis.py::test FAILED [ 37%] >test/test_errorband.py::test FAILED [ 38%] >test/test_errorbar.py::test FAILED [ 39%] >test/test_escape_chars.py::test FAILED [ 40%] >test/test_externalize_tables.py::test FAILED [ 41%] >test/test_fancy_colorbar.py::test FAILED [ 43%] >test/test_fancybox.py::test FAILED [ 44%] >test/test_fillstyle.py::test FAILED [ 45%] >test/test_hatch.py::test FAILED [ 46%] >test/test_heat.py::test FAILED [ 47%] >test/test_histogram.py::test FAILED [ 48%] >test/test_image_plot_lower.py::test FAILED [ 49%] >test/test_legend_best_location.py::test FAILED [ 50%] >test/test_legend_columns.py::test FAILED [ 51%] >test/test_legend_labels.py::test FAILED [ 52%] >test/test_legend_line_scatter.py::test FAILED [ 53%] >test/test_legends.py::test FAILED [ 54%] >test/test_legends2.py::test FAILED [ 55%] >test/test_line_collection.py::test FAILED [ 56%] >test/test_line_color_marker.py::test FAILED [ 58%] >test/test_line_dashes.py::test FAILED [ 59%] >test/test_line_set_data.py::test FAILED [ 60%] >test/test_loglogplot.py::test FAILED [ 61%] >test/test_logplot.py::test FAILED [ 62%] >test/test_logplot_base.py::test FAILED [ 63%] >test/test_marker.py::test FAILED [ 64%] >test/test_noise.py::test FAILED [ 65%] >test/test_noise2.py::test FAILED [ 66%] >test/test_pandas_dataframe.py::test FAILED [ 67%] >test/test_patch_styles.py::test FAILED [ 68%] >test/test_quadmesh.py::test FAILED [ 69%] >test/test_rotated_labels.py::test_rotated_labels_parameters[None-None-1rem-3rem-90] PASSED [ 70%] >test/test_rotated_labels.py::test_rotated_labels_parameters[None-center-1rem-3rem-90] PASSED [ 72%] >test/test_rotated_labels.py::test_rotated_labels_parameters[center-None-1rem-3rem-90] PASSED [ 73%] >test/test_rotated_labels.py::test_rotated_labels_parameters[center-center-None-3rem-90] PASSED [ 74%] >test/test_rotated_labels.py::test_rotated_labels_parameters[left-left-None-3rem-90] PASSED [ 75%] >test/test_rotated_labels.py::test_rotated_labels_parameters[right-right-None-3rem-90] PASSED [ 76%] >test/test_rotated_labels.py::test_rotated_labels_parameters[center-center-1rem-None-90] PASSED [ 77%] >test/test_rotated_labels.py::test_rotated_labels_parameters[left-left-2rem-None-90] PASSED [ 78%] >test/test_rotated_labels.py::test_rotated_labels_parameters[right-right-3rem-None-90] PASSED [ 79%] >test/test_rotated_labels.py::test_rotated_labels_parameters[center-center-1rem-3rem-90] PASSED [ 80%] >test/test_rotated_labels.py::test_rotated_labels_parameters[left-left-2rem-3rem-90] PASSED [ 81%] >test/test_rotated_labels.py::test_rotated_labels_parameters[right-right-3rem-3rem-90] PASSED [ 82%] >test/test_rotated_labels.py::test_rotated_labels_parameters[left-right-2rem-3rem-90] PASSED [ 83%] >test/test_rotated_labels.py::test_rotated_labels_parameters[right-left-3rem-3rem-90] PASSED [ 84%] >test/test_rotated_labels.py::test_rotated_labels_parameters_different_values[None-None] PASSED [ 86%] >test/test_rotated_labels.py::test_rotated_labels_parameters_different_values[1rem-None] PASSED [ 87%] >test/test_rotated_labels.py::test_rotated_labels_parameters_different_values[None-3rem] PASSED [ 88%] >test/test_rotated_labels.py::test_rotated_labels_parameters_different_values[2rem-3rem] PASSED [ 89%] >test/test_rotated_labels.py::test_rotated_labels_parameters_no_ticks PASSED [ 90%] >test/test_scatter.py::test FAILED [ 91%] >test/test_scatter_colormap.py::test FAILED [ 92%] >test/test_sharex_and_y.py::test FAILED [ 93%] >test/test_steps.py::test FAILED [ 94%] >test/test_subplot4x4.py::test FAILED [ 95%] >test/test_subplots.py::test FAILED [ 96%] >test/test_text_overlay.py::test FAILED [ 97%] >test/test_tick_positions.py::test FAILED [ 98%] >test/test_viridis.py::test FAILED [100%] > >=================================== FAILURES =================================== >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, __file__[:-3] + "_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_annotate.py:40: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f1863077f50> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmpduorrml9.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 12, c2pwrite = 13, errread = -1 >errwrite = 13, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, __file__[:-3] + "_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_axvline.py:18: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f1862eb9f50> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmpj4_avyn4.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 13, c2pwrite = 14, errread = -1 >errwrite = 14, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, "test_barchart_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_barchart.py:31: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f1862c10450> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmpy6ilw07r.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 14, c2pwrite = 15, errread = -1 >errwrite = 15, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, "test_barchart_errorbars_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_barchart_errorbars.py:36: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:38: in assert_equality > include_disclaimer=False, float_format=".8g", **extra_get_tikz_code_args >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:190: in get_tikz_code > data, content = _recurse(data, figure) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:353: in _recurse > data, children_content = _recurse(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:378: in _recurse > data, cont = _draw_collection(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:321: in _draw_collection > return _line2d.draw_linecollection(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_line2d.py:118: in draw_linecollection > data, options = mypath.get_draw_options(data, obj, color, None, style, width) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_path.py:282: in get_draw_options > ls_ = mpl_linestyle2pgfplots_linestyle(data, ls) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >data = {'add axis environment': True, 'axis height': None, 'axis width': None, 'base name': 'tmp', ...} >line_style = (0, None), line = None > > def mpl_linestyle2pgfplots_linestyle(data, line_style, line=None): > """Translates a line style of matplotlib to the corresponding style > in PGFPlots. > """ > # linestyle is a string or dash tuple. Legal string values are > # solid|dashed|dashdot|dotted. The dash tuple is (offset, onoffseq) where onoffseq > # is an even length tuple of on and off ink in points. > # > # solid: [(None, None), (None, None), ..., (None, None)] > # dashed: (0, (6.0, 6.0)) > # dotted: (0, (1.0, 3.0)) > # dashdot: (0, (3.0, 5.0, 1.0, 5.0)) > ff = data["float format"] > if isinstance(line_style, tuple): > if line_style[0] is None: > return None > >> if len(line_style[1]) == 2: >E TypeError: object of type 'NoneType' has no len() > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_path.py:372: TypeError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, "test_barchart_legend_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_barchart_legend.py:36: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f186315d710> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmpmy3mnb96.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 16, c2pwrite = 17, errread = -1 >errwrite = 17, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, "test_basic_sin_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_basic_sin.py:26: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f1862f9fdd0> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmp3t6urdtd.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 17, c2pwrite = 18, errread = -1 >errwrite = 18, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, "test_boxplot_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_boxplot.py:93: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f1862ea6cd0> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmp5t_lfeht.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 18, c2pwrite = 19, errread = -1 >errwrite = 19, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_________________________ Test_plottypes.test_scatter __________________________ > >self = <test_cleanfigure.Test_plottypes object at 0x7f1862f46150> > > def test_scatter(self): > x = np.linspace(1, 100, 20) > y = np.linspace(1, 100, 20) > with plt.rc_context(rc=RC_PARAMS): > fig, ax = plt.subplots(1, 1, figsize=(5, 5)) > ax.scatter(x, y) > ax.set_ylim([20, 80]) > ax.set_xlim([20, 80]) >> raw = get_tikz_code() > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_cleanfigure.py:57: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:190: in get_tikz_code > data, content = _recurse(data, figure) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:353: in _recurse > data, children_content = _recurse(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:378: in _recurse > data, cont = _draw_collection(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:319: in _draw_collection > return _path.draw_pathcollection(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_path.py:182: in draw_pathcollection > data, extra_draw_options = get_draw_options(data, obj, ec, fc, ls, None) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_path.py:282: in get_draw_options > ls_ = mpl_linestyle2pgfplots_linestyle(data, ls) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >data = {'add axis environment': True, 'axis height': None, 'axis width': None, 'base name': 'tmp', ...} >line_style = (0.0, None), line = None > > def mpl_linestyle2pgfplots_linestyle(data, line_style, line=None): > """Translates a line style of matplotlib to the corresponding style > in PGFPlots. > """ > # linestyle is a string or dash tuple. Legal string values are > # solid|dashed|dashdot|dotted. The dash tuple is (offset, onoffseq) where onoffseq > # is an even length tuple of on and off ink in points. > # > # solid: [(None, None), (None, None), ..., (None, None)] > # dashed: (0, (6.0, 6.0)) > # dotted: (0, (1.0, 3.0)) > # dashdot: (0, (3.0, 5.0, 1.0, 5.0)) > ff = data["float format"] > if isinstance(line_style, tuple): > if line_style[0] is None: > return None > >> if len(line_style[1]) == 2: >E TypeError: object of type 'NoneType' has no len() > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_path.py:372: TypeError >________________________ Test_plottypes.test_scatter3d _________________________ > >self = <test_cleanfigure.Test_plottypes object at 0x7f1862d25790> > > def test_scatter3d(self): > theta = np.linspace(-4 * np.pi, 4 * np.pi, 100) > z = np.linspace(-2, 2, 100) > r = z ** 2 + 1 > x = r * np.sin(theta) > y = r * np.cos(theta) > > with plt.rc_context(rc=RC_PARAMS): > fig = plt.figure() > ax = fig.add_subplot(111, projection="3d") > ax.scatter(x, y, z) > ax.set_xlim([-2, 2]) > ax.set_ylim([-2, 2]) > ax.set_zlim([-2, 2]) > ax.view_init(30, 30) >> raw = get_tikz_code(fig) > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_cleanfigure.py:137: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:190: in get_tikz_code > data, content = _recurse(data, figure) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:353: in _recurse > data, children_content = _recurse(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:378: in _recurse > data, cont = _draw_collection(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:319: in _draw_collection > return _path.draw_pathcollection(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_path.py:182: in draw_pathcollection > data, extra_draw_options = get_draw_options(data, obj, ec, fc, ls, None) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_path.py:282: in get_draw_options > ls_ = mpl_linestyle2pgfplots_linestyle(data, ls) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >data = {'add axis environment': True, 'axis height': None, 'axis width': None, 'base name': 'tmp', ...} >line_style = (0.0, None), line = None > > def mpl_linestyle2pgfplots_linestyle(data, line_style, line=None): > """Translates a line style of matplotlib to the corresponding style > in PGFPlots. > """ > # linestyle is a string or dash tuple. Legal string values are > # solid|dashed|dashdot|dotted. The dash tuple is (offset, onoffseq) where onoffseq > # is an even length tuple of on and off ink in points. > # > # solid: [(None, None), (None, None), ..., (None, None)] > # dashed: (0, (6.0, 6.0)) > # dotted: (0, (1.0, 3.0)) > # dashdot: (0, (3.0, 5.0, 1.0, 5.0)) > ff = data["float format"] > if isinstance(line_style, tuple): > if line_style[0] is None: > return None > >> if len(line_style[1]) == 2: >E TypeError: object of type 'NoneType' has no len() > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_path.py:372: TypeError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, "test_colorbars_reference.tex", assert_compilation=False) > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_colorbars.py:78: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >plot = <function plot at 0x7f186afb24d0> >filename = 'test_colorbars_reference.tex', assert_compilation = False >extra_get_tikz_code_args = {} >code = '\\begin{tikzpicture}\n\n\\begin{groupplot}[group style={group size=1 by 3}]\n\\nextgroupplot[\ntick align=outside,\nt...s cs:1.5,0)\n--(axis cs:1,1)\n--(axis cs:-1,1)\n--(axis cs:-1.5,0)\n--cycle;\n\\end{groupplot}\n\n\\end{tikzpicture}\n' >this_dir = '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test' >f = <_io.TextIOWrapper name='/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_colorbars_reference.tex' mode='r' encoding='utf-8'> >reference = '\\begin{tikzpicture}\n\n\\begin{groupplot}[group style={group size=1 by 3}]\n\\nextgroupplot[\ntick align=outside,\nt...1.25,0.5)\n--(axis cs:1,1)\n--(axis cs:0,1)\n--(axis cs:-0.25,0.5)\n--cycle;\n\\end{groupplot}\n\n\\end{tikzpicture}\n' > > def assert_equality( > plot, filename, assert_compilation=True, **extra_get_tikz_code_args > ): > plot() > code = tikzplotlib.get_tikz_code( > include_disclaimer=False, float_format=".8g", **extra_get_tikz_code_args > ) > plt.close() > > this_dir = os.path.dirname(os.path.abspath(__file__)) > with open(os.path.join(this_dir, filename), "r", encoding="utf-8") as f: > reference = f.read() >> assert reference == code, _unidiff_output(code, reference) >E AssertionError: --- >E +++ >E @@ -37,32 +37,32 @@ >E tick pos=left, >E x grid style={white!69.019608!black}, >E xlabel={Discrete intervals, some other units}, >E -xmin=0.65, xmax=8.35, >E +xmin=-0.05, xmax=1.05, >E xtick style={color=black}, >E -xtick={1,2,4,7,8}, >E +xtick={0,0.14285714,0.42857143,0.85714286,1}, >E xticklabels={1,2,4,7,8}, >E -ymin=1, ymax=8 >E +ymin=0, ymax=1 >E ] >E \path [draw=white, fill=white, line width=0.004pt] >E -(axis cs:0.65,4.5) >E +(axis cs:-0.05,0.5) >E +--(axis cs:0,0) >E +--(axis cs:1,0) >E +--(axis cs:1.05,0.5) >E +--(axis cs:1.05,0.5) >E --(axis cs:1,1) >E ---(axis cs:8,1) >E ---(axis cs:8.35,4.5) >E ---(axis cs:8.35,4.5) >E ---(axis cs:8,8) >E ---(axis cs:1,8) >E ---(axis cs:0.65,4.5) >E +--(axis cs:0,1) >E +--(axis cs:-0.05,0.5) >E --cycle; >E -\addplot graphics [includegraphics cmd=\pgfimage,xmin=0.65, xmax=8.35, ymin=1, ymax=8] {tmp-001.png}; >E +\addplot graphics [includegraphics cmd=\pgfimage,xmin=-0.05, xmax=1.05, ymin=0, ymax=1] {tmp-001.png}; >E \path [draw=black, line width=0.32pt] >E -(axis cs:0.65,4.5) >E +(axis cs:-0.05,0.5) >E +--(axis cs:0,0) >E +--(axis cs:1,0) >E +--(axis cs:1.05,0.5) >E +--(axis cs:1.05,0.5) >E --(axis cs:1,1) >E ---(axis cs:8,1) >E ---(axis cs:8.35,4.5) >E ---(axis cs:8.35,4.5) >E ---(axis cs:8,8) >E ---(axis cs:1,8) >E ---(axis cs:0.65,4.5) >E +--(axis cs:0,1) >E +--(axis cs:-0.05,0.5) >E --cycle; >E >E \nextgroupplot[ >E @@ -70,30 +70,32 @@ >E tick pos=left, >E x grid style={white!69.019608!black}, >E xlabel={Custom extension lengths, some other units}, >E -xmin=-1.5, xmax=1.5, >E +xmin=-0.25, xmax=1.25, >E xtick style={color=black}, >E -ymin=-1, ymax=1 >E +xtick={0,0.25,0.5,0.75,1}, >E +xticklabels={−1.0,−0.5,0.0,0.5,1.0}, >E +ymin=0, ymax=1 >E ] >E \path [draw=white, fill=white, line width=0.004pt] >E -(axis cs:-1.5,0) >E ---(axis cs:-1,-1) >E ---(axis cs:1,-1) >E ---(axis cs:1.5,0) >E ---(axis cs:1.5,0) >E +(axis cs:-0.25,0.5) >E +--(axis cs:0,0) >E +--(axis cs:1,0) >E +--(axis cs:1.25,0.5) >E +--(axis cs:1.25,0.5) >E --(axis cs:1,1) >E ---(axis cs:-1,1) >E ---(axis cs:-1.5,0) >E +--(axis cs:0,1) >E +--(axis cs:-0.25,0.5) >E --cycle; >E -\addplot graphics [includegraphics cmd=\pgfimage,xmin=-1.5, xmax=1.5, ymin=-1, ymax=1] {tmp-002.png}; >E +\addplot graphics [includegraphics cmd=\pgfimage,xmin=-0.25, xmax=1.25, ymin=0, ymax=1] {tmp-002.png}; >E \path [draw=black, line width=0.32pt] >E -(axis cs:-1.5,0) >E ---(axis cs:-1,-1) >E ---(axis cs:1,-1) >E ---(axis cs:1.5,0) >E ---(axis cs:1.5,0) >E +(axis cs:-0.25,0.5) >E +--(axis cs:0,0) >E +--(axis cs:1,0) >E +--(axis cs:1.25,0.5) >E +--(axis cs:1.25,0.5) >E --(axis cs:1,1) >E ---(axis cs:-1,1) >E ---(axis cs:-1.5,0) >E +--(axis cs:0,1) >E +--(axis cs:-0.25,0.5) >E --cycle; >E \end{groupplot} > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:45: AssertionError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, __file__[:-3] + "_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_contourf.py:34: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:38: in assert_equality > include_disclaimer=False, float_format=".8g", **extra_get_tikz_code_args >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:190: in get_tikz_code > data, content = _recurse(data, figure) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:353: in _recurse > data, children_content = _recurse(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:378: in _recurse > data, cont = _draw_collection(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:319: in _draw_collection > return _path.draw_pathcollection(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_path.py:182: in draw_pathcollection > data, extra_draw_options = get_draw_options(data, obj, ec, fc, ls, None) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_path.py:282: in get_draw_options > ls_ = mpl_linestyle2pgfplots_linestyle(data, ls) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >data = {'add axis environment': True, 'axis height': None, 'axis width': None, 'base name': 'tmp', ...} >line_style = (0.0, None), line = None > > def mpl_linestyle2pgfplots_linestyle(data, line_style, line=None): > """Translates a line style of matplotlib to the corresponding style > in PGFPlots. > """ > # linestyle is a string or dash tuple. Legal string values are > # solid|dashed|dashdot|dotted. The dash tuple is (offset, onoffseq) where onoffseq > # is an even length tuple of on and off ink in points. > # > # solid: [(None, None), (None, None), ..., (None, None)] > # dashed: (0, (6.0, 6.0)) > # dotted: (0, (1.0, 3.0)) > # dashdot: (0, (3.0, 5.0, 1.0, 5.0)) > ff = data["float format"] > if isinstance(line_style, tuple): > if line_style[0] is None: > return None > >> if len(line_style[1]) == 2: >E TypeError: object of type 'NoneType' has no len() > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_path.py:372: TypeError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, "test_custom_collection_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_custom_collection.py:77: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:38: in assert_equality > include_disclaimer=False, float_format=".8g", **extra_get_tikz_code_args >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:190: in get_tikz_code > data, content = _recurse(data, figure) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:353: in _recurse > data, children_content = _recurse(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:378: in _recurse > data, cont = _draw_collection(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:325: in _draw_collection > return _patch.draw_patchcollection(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_patch.py:96: in draw_patchcollection > data, draw_options = mypath.get_draw_options(data, obj, ec, fc, ls, w) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_path.py:282: in get_draw_options > ls_ = mpl_linestyle2pgfplots_linestyle(data, ls) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >data = {'add axis environment': True, 'axis height': None, 'axis width': None, 'base name': 'tmp', ...} >line_style = (0.0, None), line = None > > def mpl_linestyle2pgfplots_linestyle(data, line_style, line=None): > """Translates a line style of matplotlib to the corresponding style > in PGFPlots. > """ > # linestyle is a string or dash tuple. Legal string values are > # solid|dashed|dashdot|dotted. The dash tuple is (offset, onoffseq) where onoffseq > # is an even length tuple of on and off ink in points. > # > # solid: [(None, None), (None, None), ..., (None, None)] > # dashed: (0, (6.0, 6.0)) > # dotted: (0, (1.0, 3.0)) > # dashdot: (0, (3.0, 5.0, 1.0, 5.0)) > ff = data["float format"] > if isinstance(line_style, tuple): > if line_style[0] is None: > return None > >> if len(line_style[1]) == 2: >E TypeError: object of type 'NoneType' has no len() > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_path.py:372: TypeError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, __file__[:-3] + "_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_datetime.py:22: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f18630d2a90> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmplidago5o.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 19, c2pwrite = 20, errread = -1 >errwrite = 20, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, __file__[:-3] + "_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_datetime_paths.py:26: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:38: in assert_equality > include_disclaimer=False, float_format=".8g", **extra_get_tikz_code_args >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:190: in get_tikz_code > data, content = _recurse(data, figure) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:353: in _recurse > data, children_content = _recurse(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:378: in _recurse > data, cont = _draw_collection(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:325: in _draw_collection > return _patch.draw_patchcollection(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_patch.py:95: in draw_patchcollection > path = path.transformed(mpl.transforms.Affine2D(t).translate(*off)) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <matplotlib.transforms.Affine2D object at 0x7f1862ccae90> >matrix = <matplotlib.transforms.IdentityTransform object at 0x7f1862ccac50> >kwargs = {} > > def __init__(self, matrix=None, **kwargs): > """ > Initialize an Affine transform from a 3x3 numpy float array:: > > a c e > b d f > 0 0 1 > > If *matrix* is None, initialize with the identity transform. > """ > Affine2DBase.__init__(self, **kwargs) > if matrix is None: > # A bit faster than np.identity(3). > matrix = IdentityTransform._mtx.copy() >> self._mtx = matrix.copy() >E AttributeError: 'IdentityTransform' object has no attribute 'copy' > >/usr/lib/python3.7/site-packages/matplotlib/transforms.py:1846: AttributeError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, "test_dual_axis_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_dual_axis.py:19: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f1862dc3710> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmp9ilhxxr9.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 21, c2pwrite = 22, errread = -1 >errwrite = 22, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, "test_errorband_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_errorband.py:23: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:38: in assert_equality > include_disclaimer=False, float_format=".8g", **extra_get_tikz_code_args >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:190: in get_tikz_code > data, content = _recurse(data, figure) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:353: in _recurse > data, children_content = _recurse(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:378: in _recurse > data, cont = _draw_collection(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:325: in _draw_collection > return _patch.draw_patchcollection(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_patch.py:95: in draw_patchcollection > path = path.transformed(mpl.transforms.Affine2D(t).translate(*off)) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <matplotlib.transforms.Affine2D object at 0x7f1862f23850> >matrix = <matplotlib.transforms.IdentityTransform object at 0x7f1862f23390> >kwargs = {} > > def __init__(self, matrix=None, **kwargs): > """ > Initialize an Affine transform from a 3x3 numpy float array:: > > a c e > b d f > 0 0 1 > > If *matrix* is None, initialize with the identity transform. > """ > Affine2DBase.__init__(self, **kwargs) > if matrix is None: > # A bit faster than np.identity(3). > matrix = IdentityTransform._mtx.copy() >> self._mtx = matrix.copy() >E AttributeError: 'IdentityTransform' object has no attribute 'copy' > >/usr/lib/python3.7/site-packages/matplotlib/transforms.py:1846: AttributeError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, "test_errorbar_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_errorbar.py:20: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:38: in assert_equality > include_disclaimer=False, float_format=".8g", **extra_get_tikz_code_args >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:190: in get_tikz_code > data, content = _recurse(data, figure) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:353: in _recurse > data, children_content = _recurse(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:378: in _recurse > data, cont = _draw_collection(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:321: in _draw_collection > return _line2d.draw_linecollection(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_line2d.py:118: in draw_linecollection > data, options = mypath.get_draw_options(data, obj, color, None, style, width) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_path.py:282: in get_draw_options > ls_ = mpl_linestyle2pgfplots_linestyle(data, ls) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >data = {'add axis environment': True, 'axis height': None, 'axis width': None, 'base name': 'tmp', ...} >line_style = (0.0, None), line = None > > def mpl_linestyle2pgfplots_linestyle(data, line_style, line=None): > """Translates a line style of matplotlib to the corresponding style > in PGFPlots. > """ > # linestyle is a string or dash tuple. Legal string values are > # solid|dashed|dashdot|dotted. The dash tuple is (offset, onoffseq) where onoffseq > # is an even length tuple of on and off ink in points. > # > # solid: [(None, None), (None, None), ..., (None, None)] > # dashed: (0, (6.0, 6.0)) > # dotted: (0, (1.0, 3.0)) > # dashdot: (0, (3.0, 5.0, 1.0, 5.0)) > ff = data["float format"] > if isinstance(line_style, tuple): > if line_style[0] is None: > return None > >> if len(line_style[1]) == 2: >E TypeError: object of type 'NoneType' has no len() > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_path.py:372: TypeError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, "test_escape_chars_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_escape_chars.py:17: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f1862efefd0> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmp4kaedmbv.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 22, c2pwrite = 23, errread = -1 >errwrite = 23, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, "test_externalize_tables_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_externalize_tables.py:25: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f18630b38d0> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmpd30yrpdl.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 23, c2pwrite = 24, errread = -1 >errwrite = 24, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, "test_fancy_colorbar_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_fancy_colorbar.py:20: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f1868dec3d0> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmp0vhqax87.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 24, c2pwrite = 25, errread = -1 >errwrite = 25, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, "test_fancybox_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_fancybox.py:200: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f186269c410> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmpm2iuza8j.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 25, c2pwrite = 26, errread = -1 >errwrite = 26, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, "test_fillstyle_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_fillstyle.py:19: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f1862fcb490> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmp6qo00es2.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 26, c2pwrite = 27, errread = -1 >errwrite = 27, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, "test_hatch_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_hatch.py:60: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f18626e2a10> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmpz15szoeo.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 27, c2pwrite = 28, errread = -1 >errwrite = 28, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, "test_heat_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_heat.py:19: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f1862688e90> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmp60_ogyze.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 28, c2pwrite = 29, errread = -1 >errwrite = 29, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, "test_histogram_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_histogram.py:20: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f1863080e50> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmp8lqobo89.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 29, c2pwrite = 30, errread = -1 >errwrite = 30, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, "test_image_plot_lower_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_image_plot_lower.py:31: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f1862ca3b90> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmpjaaiimtb.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 30, c2pwrite = 31, errread = -1 >errwrite = 31, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, "test_legend_best_location_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_legend_best_location.py:63: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f18624b6c10> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmpdwue8k14.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 31, c2pwrite = 32, errread = -1 >errwrite = 32, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, "test_legend_columns_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_legend_columns.py:16: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f18623800d0> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmpddkr192u.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 32, c2pwrite = 33, errread = -1 >errwrite = 33, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, "test_legend_labels_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_legend_labels.py:24: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f18622f9450> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmp7lbv8by8.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 33, c2pwrite = 34, errread = -1 >errwrite = 34, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, __file__[:-3] + "_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_legend_line_scatter.py:19: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:38: in assert_equality > include_disclaimer=False, float_format=".8g", **extra_get_tikz_code_args >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:190: in get_tikz_code > data, content = _recurse(data, figure) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:353: in _recurse > data, children_content = _recurse(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:378: in _recurse > data, cont = _draw_collection(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:319: in _draw_collection > return _path.draw_pathcollection(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_path.py:182: in draw_pathcollection > data, extra_draw_options = get_draw_options(data, obj, ec, fc, ls, None) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_path.py:282: in get_draw_options > ls_ = mpl_linestyle2pgfplots_linestyle(data, ls) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >data = {'add axis environment': True, 'axis height': None, 'axis width': None, 'base name': 'tmp', ...} >line_style = (0.0, None), line = None > > def mpl_linestyle2pgfplots_linestyle(data, line_style, line=None): > """Translates a line style of matplotlib to the corresponding style > in PGFPlots. > """ > # linestyle is a string or dash tuple. Legal string values are > # solid|dashed|dashdot|dotted. The dash tuple is (offset, onoffseq) where onoffseq > # is an even length tuple of on and off ink in points. > # > # solid: [(None, None), (None, None), ..., (None, None)] > # dashed: (0, (6.0, 6.0)) > # dotted: (0, (1.0, 3.0)) > # dashdot: (0, (3.0, 5.0, 1.0, 5.0)) > ff = data["float format"] > if isinstance(line_style, tuple): > if line_style[0] is None: > return None > >> if len(line_style[1]) == 2: >E TypeError: object of type 'NoneType' has no len() > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_path.py:372: TypeError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, __file__[:-3] + "_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_legends.py:28: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f1862f17350> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmpmdd9sizw.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 34, c2pwrite = 35, errread = -1 >errwrite = 35, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, __file__[:-3] + "_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_legends2.py:26: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f18625eb990> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmpk5rmq6j9.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 35, c2pwrite = 36, errread = -1 >errwrite = 36, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, __file__[:-3] + "_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_line_collection.py:52: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f1862278550> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmp9enjt4id.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 36, c2pwrite = 37, errread = -1 >errwrite = 37, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, __file__[:-3] + "_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_line_color_marker.py:24: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f186210b150> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmpctz8zr9t.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 37, c2pwrite = 38, errread = -1 >errwrite = 38, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, __file__[:-3] + "_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_line_dashes.py:15: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f1862e34950> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmptcadghb1.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 38, c2pwrite = 39, errread = -1 >errwrite = 39, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, "test_line_set_data_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_line_set_data.py:15: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f18622e9690> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmpvg5rvric.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 39, c2pwrite = 40, errread = -1 >errwrite = 40, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, __file__[:-3] + "_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_loglogplot.py:15: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f18624cb0d0> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmplvxehe_b.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 40, c2pwrite = 41, errread = -1 >errwrite = 41, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, __file__[:-3] + "_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_logplot.py:18: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f18621f9d10> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmpo47khtjr.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 41, c2pwrite = 42, errread = -1 >errwrite = 42, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, __file__[:-3] + "_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_logplot_base.py:18: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f18623e5150> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmprr6cjgos.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 42, c2pwrite = 43, errread = -1 >errwrite = 43, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, __file__[:-3] + "_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_marker.py:26: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:38: in assert_equality > include_disclaimer=False, float_format=".8g", **extra_get_tikz_code_args >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:190: in get_tikz_code > data, content = _recurse(data, figure) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:353: in _recurse > data, children_content = _recurse(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:378: in _recurse > data, cont = _draw_collection(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:319: in _draw_collection > return _path.draw_pathcollection(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_path.py:182: in draw_pathcollection > data, extra_draw_options = get_draw_options(data, obj, ec, fc, ls, None) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_path.py:282: in get_draw_options > ls_ = mpl_linestyle2pgfplots_linestyle(data, ls) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >data = {'add axis environment': True, 'axis height': None, 'axis width': None, 'base name': 'tmp', ...} >line_style = (0.0, None), line = None > > def mpl_linestyle2pgfplots_linestyle(data, line_style, line=None): > """Translates a line style of matplotlib to the corresponding style > in PGFPlots. > """ > # linestyle is a string or dash tuple. Legal string values are > # solid|dashed|dashdot|dotted. The dash tuple is (offset, onoffseq) where onoffseq > # is an even length tuple of on and off ink in points. > # > # solid: [(None, None), (None, None), ..., (None, None)] > # dashed: (0, (6.0, 6.0)) > # dotted: (0, (1.0, 3.0)) > # dashdot: (0, (3.0, 5.0, 1.0, 5.0)) > ff = data["float format"] > if isinstance(line_style, tuple): > if line_style[0] is None: > return None > >> if len(line_style[1]) == 2: >E TypeError: object of type 'NoneType' has no len() > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_path.py:372: TypeError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, __file__[:-3] + "_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_noise.py:26: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f1863104f10> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmp4mgowdtw.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 43, c2pwrite = 44, errread = -1 >errwrite = 44, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, __file__[:-3] + "_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_noise2.py:26: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f1862c2ba50> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmptm2q1fx1.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 44, c2pwrite = 45, errread = -1 >errwrite = 45, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, __file__[:-3] + "_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_pandas_dataframe.py:15: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:38: in assert_equality > include_disclaimer=False, float_format=".8g", **extra_get_tikz_code_args >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:190: in get_tikz_code > data, content = _recurse(data, figure) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:353: in _recurse > data, children_content = _recurse(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:378: in _recurse > data, cont = _draw_collection(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:319: in _draw_collection > return _path.draw_pathcollection(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_path.py:182: in draw_pathcollection > data, extra_draw_options = get_draw_options(data, obj, ec, fc, ls, None) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_path.py:282: in get_draw_options > ls_ = mpl_linestyle2pgfplots_linestyle(data, ls) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >data = {'add axis environment': True, 'axis height': None, 'axis width': None, 'base name': 'tmp', ...} >line_style = (0.0, None), line = None > > def mpl_linestyle2pgfplots_linestyle(data, line_style, line=None): > """Translates a line style of matplotlib to the corresponding style > in PGFPlots. > """ > # linestyle is a string or dash tuple. Legal string values are > # solid|dashed|dashdot|dotted. The dash tuple is (offset, onoffseq) where onoffseq > # is an even length tuple of on and off ink in points. > # > # solid: [(None, None), (None, None), ..., (None, None)] > # dashed: (0, (6.0, 6.0)) > # dotted: (0, (1.0, 3.0)) > # dashdot: (0, (3.0, 5.0, 1.0, 5.0)) > ff = data["float format"] > if isinstance(line_style, tuple): > if line_style[0] is None: > return None > >> if len(line_style[1]) == 2: >E TypeError: object of type 'NoneType' has no len() > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_path.py:372: TypeError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, __file__[:-3] + "_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_patch_styles.py:23: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:38: in assert_equality > include_disclaimer=False, float_format=".8g", **extra_get_tikz_code_args >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:190: in get_tikz_code > data, content = _recurse(data, figure) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:353: in _recurse > data, children_content = _recurse(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:378: in _recurse > data, cont = _draw_collection(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:325: in _draw_collection > return _patch.draw_patchcollection(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_patch.py:95: in draw_patchcollection > path = path.transformed(mpl.transforms.Affine2D(t).translate(*off)) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <matplotlib.transforms.Affine2D object at 0x7f1862d3ff10> >matrix = <matplotlib.transforms.IdentityTransform object at 0x7f1862d3ffd0> >kwargs = {} > > def __init__(self, matrix=None, **kwargs): > """ > Initialize an Affine transform from a 3x3 numpy float array:: > > a c e > b d f > 0 0 1 > > If *matrix* is None, initialize with the identity transform. > """ > Affine2DBase.__init__(self, **kwargs) > if matrix is None: > # A bit faster than np.identity(3). > matrix = IdentityTransform._mtx.copy() >> self._mtx = matrix.copy() >E AttributeError: 'IdentityTransform' object has no attribute 'copy' > >/usr/lib/python3.7/site-packages/matplotlib/transforms.py:1846: AttributeError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, __file__[:-3] + "_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_quadmesh.py:36: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f186215cb90> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmpedcv_2vr.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 45, c2pwrite = 46, errread = -1 >errwrite = 46, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, __file__[:-3] + "_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_scatter.py:19: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:38: in assert_equality > include_disclaimer=False, float_format=".8g", **extra_get_tikz_code_args >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:190: in get_tikz_code > data, content = _recurse(data, figure) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:353: in _recurse > data, children_content = _recurse(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:378: in _recurse > data, cont = _draw_collection(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_save.py:319: in _draw_collection > return _path.draw_pathcollection(data, child) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_path.py:182: in draw_pathcollection > data, extra_draw_options = get_draw_options(data, obj, ec, fc, ls, None) >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_path.py:282: in get_draw_options > ls_ = mpl_linestyle2pgfplots_linestyle(data, ls) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >data = {'add axis environment': True, 'axis height': None, 'axis width': None, 'base name': 'tmp', ...} >line_style = (0.0, None), line = None > > def mpl_linestyle2pgfplots_linestyle(data, line_style, line=None): > """Translates a line style of matplotlib to the corresponding style > in PGFPlots. > """ > # linestyle is a string or dash tuple. Legal string values are > # solid|dashed|dashdot|dotted. The dash tuple is (offset, onoffseq) where onoffseq > # is an even length tuple of on and off ink in points. > # > # solid: [(None, None), (None, None), ..., (None, None)] > # dashed: (0, (6.0, 6.0)) > # dotted: (0, (1.0, 3.0)) > # dashdot: (0, (3.0, 5.0, 1.0, 5.0)) > ff = data["float format"] > if isinstance(line_style, tuple): > if line_style[0] is None: > return None > >> if len(line_style[1]) == 2: >E TypeError: object of type 'NoneType' has no len() > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_path.py:372: TypeError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, __file__[:-3] + "_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_scatter_colormap.py:20: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >plot = <function plot at 0x7f18631ff8c0> >filename = '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_scatter_colormap_reference.tex' >assert_compilation = True, extra_get_tikz_code_args = {} >code = '\\begin{tikzpicture}\n\n\\begin{axis}[\ntick align=outside,\ntick pos=left,\nx grid style={white!69.019608!black},\nx...363 1.0040539 -0.87953634 2.4128222\n-0.8667404 0.3861864 0.28362732 3.950661\n};\n\\end{axis}\n\n\\end{tikzpicture}\n' >this_dir = '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test' >f = <_io.TextIOWrapper name='/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_scatter_colormap_reference.tex' mode='r' encoding='utf-8'> >reference = '\\begin{tikzpicture}\n\n\\begin{axis}[\ntick align=outside,\ntick pos=left,\nx grid style={white!69.019608!black},\nx...363 1.0040539 -0.87953634 2.4128222\n-0.8667404 0.3861864 0.28362732 3.950661\n};\n\\end{axis}\n\n\\end{tikzpicture}\n' > > def assert_equality( > plot, filename, assert_compilation=True, **extra_get_tikz_code_args > ): > plot() > code = tikzplotlib.get_tikz_code( > include_disclaimer=False, float_format=".8g", **extra_get_tikz_code_args > ) > plt.close() > > this_dir = os.path.dirname(os.path.abspath(__file__)) > with open(os.path.join(this_dir, filename), "r", encoding="utf-8") as f: > reference = f.read() >> assert reference == code, _unidiff_output(code, reference) >E AssertionError: --- >E +++ >E @@ -4,10 +4,10 @@ >E tick align=outside, >E tick pos=left, >E x grid style={white!69.019608!black}, >E -xmin=-2.630585, xmax=1.8553423, >E +xmin=-2.6372526, xmax=1.8614963, >E xtick style={color=black}, >E y grid style={white!69.019608!black}, >E -ymin=-0.82312696, ymax=2.3501709, >E +ymin=-0.83585322, ymax=2.3593314, >E ytick style={color=black} >E ] >E \addplot [only marks, scatter, scatter src=explicit, colormap/viridis, visualization depends on={\thisrow{sizedata} \as\perpointmarksize}, scatter/@pre marker code/.append style={/tikz/mark size=\perpointmarksize}] > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:45: AssertionError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, __file__[:-3] + "_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_sharex_and_y.py:19: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f18627d4ed0> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmpnm583o_p.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 66, c2pwrite = 67, errread = -1 >errwrite = 67, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, __file__[:-3] + "_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_steps.py:27: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f18625e7790> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmpnj7rjyz7.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 67, c2pwrite = 68, errread = -1 >errwrite = 68, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, __file__[:-3] + "_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_subplot4x4.py:38: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f18630b3890> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmp45zyv50u.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 68, c2pwrite = 69, errread = -1 >errwrite = 69, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, __file__[:-3] + "_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_subplots.py:37: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f1862133dd0> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmp4yco6mp9.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 69, c2pwrite = 70, errread = -1 >errwrite = 70, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, __file__[:-3] + "_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_text_overlay.py:117: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f186258c050> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmpzmshel06.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 70, c2pwrite = 71, errread = -1 >errwrite = 71, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, __file__[:-3] + "_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_tick_positions.py:96: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f1862f19c90> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmpe_lq8syz.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 71, c2pwrite = 72, errread = -1 >errwrite = 72, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >_____________________________________ test _____________________________________ > > def test(): >> assert_equality(plot, __file__[:-3] + "_reference.tex") > >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_viridis.py:20: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:53: in assert_equality > assert _compile(code) is not None, code >/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/helpers.py:70: in _compile > stderr=subprocess.STDOUT, >/usr/lib/python3.7/subprocess.py:411: in check_output > **kwargs).stdout >/usr/lib/python3.7/subprocess.py:488: in run > with Popen(*popenargs, **kwargs) as process: >/usr/lib/python3.7/subprocess.py:800: in __init__ > restore_signals, start_new_session) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <subprocess.Popen object at 0x7f18627bdf10> >args = ['pdflatex', '--interaction=nonstopmode', '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/tmpx96ax_e0.tex'] >executable = b'pdflatex', preexec_fn = None, close_fds = True, pass_fds = () >cwd = None, env = None, startupinfo = None, creationflags = 0, shell = False >p2cread = -1, p2cwrite = -1, c2pread = 72, c2pwrite = 73, errread = -1 >errwrite = 73, restore_signals = True, start_new_session = False > > def _execute_child(self, args, executable, preexec_fn, close_fds, > pass_fds, cwd, env, > startupinfo, creationflags, shell, > p2cread, p2cwrite, > c2pread, c2pwrite, > errread, errwrite, > restore_signals, start_new_session): > """Execute program (POSIX version)""" > > if isinstance(args, (str, bytes)): > args = [args] > else: > args = list(args) > > if shell: > # On Android the default shell is at '/system/bin/sh'. > unix_shell = ('/system/bin/sh' if > hasattr(sys, 'getandroidapilevel') else '/bin/sh') > args = [unix_shell, "-c"] + args > if executable: > args[0] = executable > > if executable is None: > executable = args[0] > orig_executable = executable > > # For transferring possible exec failure from child to parent. > # Data format: "exception name:hex errno:description" > # Pickle is not used; it is complex and involves memory allocation. > errpipe_read, errpipe_write = os.pipe() > # errpipe_write must not be in the standard io 0, 1, or 2 fd range. > low_fds_to_close = [] > while errpipe_write < 3: > low_fds_to_close.append(errpipe_write) > errpipe_write = os.dup(errpipe_write) > for low_fd in low_fds_to_close: > os.close(low_fd) > try: > try: > # We must avoid complex work that could involve > # malloc or free in the child process to avoid > # potential deadlocks, thus we do all this here. > # and pass it to fork_exec() > > if env is not None: > env_list = [] > for k, v in env.items(): > k = os.fsencode(k) > if b'=' in k: > raise ValueError("illegal environment variable name") > env_list.append(k + b'=' + os.fsencode(v)) > else: > env_list = None # Use execv instead of execve. > executable = os.fsencode(executable) > if os.path.dirname(executable): > executable_list = (executable,) > else: > # This matches the behavior of os._execvpe(). > executable_list = tuple( > os.path.join(os.fsencode(dir), executable) > for dir in os.get_exec_path(env)) > fds_to_keep = set(pass_fds) > fds_to_keep.add(errpipe_write) > self.pid = _posixsubprocess.fork_exec( > args, executable_list, > close_fds, tuple(sorted(map(int, fds_to_keep))), > cwd, env_list, > p2cread, p2cwrite, c2pread, c2pwrite, > errread, errwrite, > errpipe_read, errpipe_write, > restore_signals, start_new_session, preexec_fn) > self._child_created = True > finally: > # be sure the FD is closed no matter what > os.close(errpipe_write) > > # self._devnull is not always defined. > devnull_fd = getattr(self, '_devnull', None) > if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd: > os.close(p2cread) > if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd: > os.close(c2pwrite) > if errwrite != -1 and errread != -1 and errwrite != devnull_fd: > os.close(errwrite) > if devnull_fd is not None: > os.close(devnull_fd) > # Prevent a double close of these fds from __init__ on error. > self._closed_child_pipe_fds = True > > # Wait for exec to fail or succeed; possibly raising an > # exception (limited in size) > errpipe_data = bytearray() > while True: > part = os.read(errpipe_read, 50000) > errpipe_data += part > if not part or len(errpipe_data) > 50000: > break > finally: > # be sure the FD is closed no matter what > os.close(errpipe_read) > > if errpipe_data: > try: > pid, sts = os.waitpid(self.pid, 0) > if pid == self.pid: > self._handle_exitstatus(sts) > else: > self.returncode = sys.maxsize > except ChildProcessError: > pass > > try: > exception_name, hex_errno, err_msg = ( > errpipe_data.split(b':', 2)) > # The encoding here should match the encoding > # written in by the subprocess implementations > # like _posixsubprocess > err_msg = err_msg.decode() > except ValueError: > exception_name = b'SubprocessError' > hex_errno = b'0' > err_msg = 'Bad exception data from child: {!r}'.format( > bytes(errpipe_data)) > child_exception_type = getattr( > builtins, exception_name.decode('ascii'), > SubprocessError) > if issubclass(child_exception_type, OSError) and hex_errno: > errno_num = int(hex_errno, 16) > child_exec_never_called = (err_msg == "noexec") > if child_exec_never_called: > err_msg = "" > # The error must be from chdir(cwd). > err_filename = cwd > else: > err_filename = orig_executable > if errno_num != 0: > err_msg = os.strerror(errno_num) > if errno_num == errno.ENOENT: > err_msg += ': ' + repr(err_filename) >> raise child_exception_type(errno_num, err_msg, err_filename) >E FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex': 'pdflatex' > >/usr/lib/python3.7/subprocess.py:1551: FileNotFoundError >=============================== warnings summary =============================== >test/test_annotate.py: 2 warnings >test/test_axvline.py: 1 warning >test/test_barchart.py: 1 warning >test/test_barchart_errorbars.py: 1 warning >test/test_barchart_legend.py: 1 warning >test/test_basic_sin.py: 2 warnings >test/test_boxplot.py: 2 warnings >test/test_cleanfigure.py: 9 warnings >test/test_colorbars.py: 1 warning >test/test_contourf.py: 1 warning >test/test_custom_collection.py: 1 warning >test/test_datetime.py: 1 warning >test/test_datetime_paths.py: 1 warning >test/test_dual_axis.py: 2 warnings >test/test_errorband.py: 1 warning >test/test_errorbar.py: 1 warning >test/test_escape_chars.py: 1 warning >test/test_externalize_tables.py: 2 warnings >test/test_fancy_colorbar.py: 1 warning >test/test_fancybox.py: 1 warning >test/test_fillstyle.py: 2 warnings >test/test_hatch.py: 1 warning >test/test_heat.py: 1 warning >test/test_histogram.py: 1 warning >test/test_image_plot_lower.py: 1 warning >test/test_legend_best_location.py: 2 warnings >test/test_legend_columns.py: 2 warnings >test/test_legend_labels.py: 2 warnings >test/test_legend_line_scatter.py: 1 warning >test/test_legends.py: 2 warnings >test/test_legends2.py: 2 warnings >test/test_line_collection.py: 1 warning >test/test_line_color_marker.py: 2 warnings >test/test_line_dashes.py: 1 warning >test/test_line_set_data.py: 1 warning >test/test_loglogplot.py: 2 warnings >test/test_logplot.py: 1 warning >test/test_logplot_base.py: 1 warning >test/test_marker.py: 1 warning >test/test_noise.py: 1 warning >test/test_noise2.py: 1 warning >test/test_pandas_dataframe.py: 1 warning >test/test_patch_styles.py: 1 warning >test/test_quadmesh.py: 1 warning >test/test_rotated_labels.py: 19 warnings >test/test_scatter.py: 1 warning >test/test_scatter_colormap.py: 1 warning >test/test_sharex_and_y.py: 2 warnings >test/test_steps.py: 2 warnings >test/test_subplot4x4.py: 2 warnings >test/test_subplots.py: 2 warnings >test/test_text_overlay.py: 2 warnings >test/test_tick_positions.py: 1 warning >test/test_viridis.py: 1 warning > /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_axes.py:211: MatplotlibDeprecationWarning: Passing the minor parameter of get_ticklocs() positionally is deprecated since Matplotlib 3.3; the parameter will become keyword-only two minor releases later. > data, "minor x", obj.get_xticks("minor"), obj.get_xticklabels("minor") > >test/test_annotate.py: 2 warnings >test/test_axvline.py: 1 warning >test/test_barchart.py: 1 warning >test/test_barchart_errorbars.py: 1 warning >test/test_barchart_legend.py: 1 warning >test/test_basic_sin.py: 2 warnings >test/test_boxplot.py: 2 warnings >test/test_cleanfigure.py: 9 warnings >test/test_colorbars.py: 1 warning >test/test_contourf.py: 1 warning >test/test_custom_collection.py: 1 warning >test/test_datetime.py: 1 warning >test/test_datetime_paths.py: 1 warning >test/test_dual_axis.py: 2 warnings >test/test_errorband.py: 1 warning >test/test_errorbar.py: 1 warning >test/test_escape_chars.py: 1 warning >test/test_externalize_tables.py: 2 warnings >test/test_fancy_colorbar.py: 1 warning >test/test_fancybox.py: 1 warning >test/test_fillstyle.py: 2 warnings >test/test_hatch.py: 1 warning >test/test_heat.py: 1 warning >test/test_histogram.py: 1 warning >test/test_image_plot_lower.py: 1 warning >test/test_legend_best_location.py: 2 warnings >test/test_legend_columns.py: 2 warnings >test/test_legend_labels.py: 2 warnings >test/test_legend_line_scatter.py: 1 warning >test/test_legends.py: 2 warnings >test/test_legends2.py: 2 warnings >test/test_line_collection.py: 1 warning >test/test_line_color_marker.py: 2 warnings >test/test_line_dashes.py: 1 warning >test/test_line_set_data.py: 1 warning >test/test_loglogplot.py: 2 warnings >test/test_logplot.py: 1 warning >test/test_logplot_base.py: 1 warning >test/test_marker.py: 1 warning >test/test_noise.py: 1 warning >test/test_noise2.py: 1 warning >test/test_pandas_dataframe.py: 1 warning >test/test_patch_styles.py: 1 warning >test/test_quadmesh.py: 1 warning >test/test_rotated_labels.py: 19 warnings >test/test_scatter.py: 1 warning >test/test_scatter_colormap.py: 1 warning >test/test_sharex_and_y.py: 2 warnings >test/test_steps.py: 2 warnings >test/test_subplot4x4.py: 2 warnings >test/test_subplots.py: 2 warnings >test/test_text_overlay.py: 2 warnings >test/test_tick_positions.py: 1 warning >test/test_viridis.py: 1 warning > /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_axes.py:216: MatplotlibDeprecationWarning: Passing the minor parameter of get_ticklocs() positionally is deprecated since Matplotlib 3.3; the parameter will become keyword-only two minor releases later. > data, "minor y", obj.get_yticks("minor"), obj.get_yticklabels("minor") > >test/test_fancy_colorbar.py::test >test/test_heat.py::test >test/test_image_plot_lower.py::test >test/test_line_collection.py::test >test/test_noise.py::test > /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_axes.py:358: MatplotlibDeprecationWarning: Passing the minor parameter of get_ticklocs() positionally is deprecated since Matplotlib 3.3; the parameter will become keyword-only two minor releases later. > colorbar_ticks_minor = colorbar.ax.get_yticks("minor") > >test/test_hatch.py::test > /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_hatches.py:69: UserWarning: tikzplotlib: Hatch '//' cannot be rendered. Only single character hatches are supported, e.g., {'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}. Hatch '/' will be used. > + f"Hatch '{hatch[0]}' will be used." > >test/test_hatch.py::test > /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_hatches.py:76: UserWarning: tikzplotlib: The hatches ['o', 'O'] do not have good PGF counterparts. > + " counterparts." > >test/test_legend_best_location.py::test > /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_legend_best_location.py:57: UserWarning: Legend does not support [<matplotlib.lines.Line2D object at 0x7f1862d834d0>, <matplotlib.lines.Line2D object at 0x7f1862d83b90>] instances. > A proxy artist may be used instead. > See: https://matplotlib.org/users/legend_guide.html#creating-artists-specifically-for-adding-to-the-legend-aka-proxy-artists > axes[8].legend((loc,), ("C",), loc=0) > >test/test_legend_best_location.py::test > /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_legend_best_location.py:57: UserWarning: Legend does not support [<matplotlib.lines.Line2D object at 0x7f1862535650>, <matplotlib.lines.Line2D object at 0x7f1862535710>] instances. > A proxy artist may be used instead. > See: https://matplotlib.org/users/legend_guide.html#creating-artists-specifically-for-adding-to-the-legend-aka-proxy-artists > axes[8].legend((loc,), ("C",), loc=0) > >test/test_logplot_base.py::test > /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_logplot_base.py:10: MatplotlibDeprecationWarning: The 'basey' parameter of __init__() has been renamed 'base' since Matplotlib 3.3; support for the old name will be dropped two minor releases later. > ax.semilogy(a, color="blue", lw=0.25, basey=2) > >test/test_noise2.py::test > /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1-python3_7/lib/tikzplotlib/_axes.py:326: MatplotlibDeprecationWarning: Passing the minor parameter of get_ticklocs() positionally is deprecated since Matplotlib 3.3; the parameter will become keyword-only two minor releases later. > colorbar_ticks_minor = colorbar.ax.get_xticks("minor") > >test/test_quadmesh.py::test > /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_quadmesh.py:23: MatplotlibDeprecationWarning: shading='flat' when X and Y have the same dimensions as C is deprecated since 3.3. Either specify the corners of the quadrilaterals with X and Y, or pass shading='auto', 'nearest' or 'gouraud', or set rcParams['pcolor.shading']. This will become an error two minor releases later. > axs[0].pcolormesh(X, Y, u(X, Y, 0)) > >test/test_quadmesh.py::test > /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_quadmesh.py:24: MatplotlibDeprecationWarning: shading='flat' when X and Y have the same dimensions as C is deprecated since 3.3. Either specify the corners of the quadrilaterals with X and Y, or pass shading='auto', 'nearest' or 'gouraud', or set rcParams['pcolor.shading']. This will become an error two minor releases later. > axs[1].pcolormesh(X, Y, v(X, Y, 0)) > >test/test_viridis.py::test > /var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1/test/test_viridis.py:13: MatplotlibDeprecationWarning: shading='flat' when X and Y have the same dimensions as C is deprecated since 3.3. Either specify the corners of the quadrilaterals with X and Y, or pass shading='auto', 'nearest' or 'gouraud', or set rcParams['pcolor.shading']. This will become an error two minor releases later. > plt.pcolormesh(x, y, z, cmap=cm.viridis) > >-- Docs: https://docs.pytest.org/en/stable/warnings.html >=========================== short test summary info ============================ >FAILED test/test_annotate.py::test - FileNotFoundError: [Errno 2] No such fil... >FAILED test/test_axvline.py::test - FileNotFoundError: [Errno 2] No such file... >FAILED test/test_barchart.py::test - FileNotFoundError: [Errno 2] No such fil... >FAILED test/test_barchart_errorbars.py::test - TypeError: object of type 'Non... >FAILED test/test_barchart_legend.py::test - FileNotFoundError: [Errno 2] No s... >FAILED test/test_basic_sin.py::test - FileNotFoundError: [Errno 2] No such fi... >FAILED test/test_boxplot.py::test - FileNotFoundError: [Errno 2] No such file... >FAILED test/test_cleanfigure.py::Test_plottypes::test_scatter - TypeError: ob... >FAILED test/test_cleanfigure.py::Test_plottypes::test_scatter3d - TypeError: ... >FAILED test/test_colorbars.py::test - AssertionError: --- >FAILED test/test_contourf.py::test - TypeError: object of type 'NoneType' has... >FAILED test/test_custom_collection.py::test - TypeError: object of type 'None... >FAILED test/test_datetime.py::test - FileNotFoundError: [Errno 2] No such fil... >FAILED test/test_datetime_paths.py::test - AttributeError: 'IdentityTransform... >FAILED test/test_dual_axis.py::test - FileNotFoundError: [Errno 2] No such fi... >FAILED test/test_errorband.py::test - AttributeError: 'IdentityTransform' obj... >FAILED test/test_errorbar.py::test - TypeError: object of type 'NoneType' has... >FAILED test/test_escape_chars.py::test - FileNotFoundError: [Errno 2] No such... >FAILED test/test_externalize_tables.py::test - FileNotFoundError: [Errno 2] N... >FAILED test/test_fancy_colorbar.py::test - FileNotFoundError: [Errno 2] No su... >FAILED test/test_fancybox.py::test - FileNotFoundError: [Errno 2] No such fil... >FAILED test/test_fillstyle.py::test - FileNotFoundError: [Errno 2] No such fi... >FAILED test/test_hatch.py::test - FileNotFoundError: [Errno 2] No such file o... >FAILED test/test_heat.py::test - FileNotFoundError: [Errno 2] No such file or... >FAILED test/test_histogram.py::test - FileNotFoundError: [Errno 2] No such fi... >FAILED test/test_image_plot_lower.py::test - FileNotFoundError: [Errno 2] No ... >FAILED test/test_legend_best_location.py::test - FileNotFoundError: [Errno 2]... >FAILED test/test_legend_columns.py::test - FileNotFoundError: [Errno 2] No su... >FAILED test/test_legend_labels.py::test - FileNotFoundError: [Errno 2] No suc... >FAILED test/test_legend_line_scatter.py::test - TypeError: object of type 'No... >FAILED test/test_legends.py::test - FileNotFoundError: [Errno 2] No such file... >FAILED test/test_legends2.py::test - FileNotFoundError: [Errno 2] No such fil... >FAILED test/test_line_collection.py::test - FileNotFoundError: [Errno 2] No s... >FAILED test/test_line_color_marker.py::test - FileNotFoundError: [Errno 2] No... >FAILED test/test_line_dashes.py::test - FileNotFoundError: [Errno 2] No such ... >FAILED test/test_line_set_data.py::test - FileNotFoundError: [Errno 2] No suc... >FAILED test/test_loglogplot.py::test - FileNotFoundError: [Errno 2] No such f... >FAILED test/test_logplot.py::test - FileNotFoundError: [Errno 2] No such file... >FAILED test/test_logplot_base.py::test - FileNotFoundError: [Errno 2] No such... >FAILED test/test_marker.py::test - TypeError: object of type 'NoneType' has n... >FAILED test/test_noise.py::test - FileNotFoundError: [Errno 2] No such file o... >FAILED test/test_noise2.py::test - FileNotFoundError: [Errno 2] No such file ... >FAILED test/test_pandas_dataframe.py::test - TypeError: object of type 'NoneT... >FAILED test/test_patch_styles.py::test - AttributeError: 'IdentityTransform' ... >FAILED test/test_quadmesh.py::test - FileNotFoundError: [Errno 2] No such fil... >FAILED test/test_scatter.py::test - TypeError: object of type 'NoneType' has ... >FAILED test/test_scatter_colormap.py::test - AssertionError: --- >FAILED test/test_sharex_and_y.py::test - FileNotFoundError: [Errno 2] No such... >FAILED test/test_steps.py::test - FileNotFoundError: [Errno 2] No such file o... >FAILED test/test_subplot4x4.py::test - FileNotFoundError: [Errno 2] No such f... >FAILED test/test_subplots.py::test - FileNotFoundError: [Errno 2] No such fil... >FAILED test/test_text_overlay.py::test - FileNotFoundError: [Errno 2] No such... >FAILED test/test_tick_positions.py::test - FileNotFoundError: [Errno 2] No su... >FAILED test/test_viridis.py::test - FileNotFoundError: [Errno 2] No such file... >================= 54 failed, 39 passed, 210 warnings in 21.02s ================= > * ERROR: dev-python/tikzplotlib-0.9.1::gentoo failed (test phase): > * Failed to run 'pytest -vv' > * > * Call stack: > * ebuild.sh, line 125: Called src_test > * environment, line 3094: Called distutils-r1_src_test > * environment, line 1348: Called _distutils-r1_run_foreach_impl 'python_test' > * environment, line 528: Called python_foreach_impl 'distutils-r1_run_phase' 'python_test' > * environment, line 2680: Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test' > * environment, line 2131: Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test' > * environment, line 2129: Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'python_test' > * environment, line 921: Called distutils-r1_run_phase 'python_test' > * environment, line 1285: Called python_test > * environment, line 3036: Called virtx 'pytest' '-vv' > * environment, line 3882: Called die > * The specific snippet of code: > * [[ ${retval} -ne 0 ]] && die "Failed to run '$@'"; > * > * If you need support, post the output of `emerge --info '=dev-python/tikzplotlib-0.9.1::gentoo'`, > * the complete build log and the output of `emerge -pqv '=dev-python/tikzplotlib-0.9.1::gentoo'`. > * The complete build log is located at '/var/log/emerge-log/build/dev-python/tikzplotlib-0.9.1:20200821-153611.log'. > * For convenience, a symlink to the build log is located at '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/build.log'. > * The ebuild environment file is located at '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/temp/environment'. > * Working directory: '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1' > * S: '/var/tmp/portage/dev-python/tikzplotlib-0.9.1/work/tikzplotlib-0.9.1'
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 738454
: 655982