DRMacIver / shrinkray

Shrinkray is a modern multi-format test-case reducer
MIT License
86 stars 2 forks source link

still having random python issues #3

Closed regehr closed 8 months ago

regehr commented 9 months ago

I'm fairly sure I properly followed the instructions for use it from the git repo directly but I'm still getting the below. I really don't do python so not sure what other info I can give you that might help track this down?

(.venv) regehr@john-home:~/reduce$ shrinkray ./test1.sh 1.cpp
Traceback (most recent call last):
  File "/home/regehr/.pyenv/versions/3.12.1/envs/.venv/bin/shrinkray", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/regehr/.pyenv/versions/3.12.1/envs/.venv/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/regehr/.pyenv/versions/3.12.1/envs/.venv/lib/python3.12/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/regehr/.pyenv/versions/3.12.1/envs/.venv/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/regehr/.pyenv/versions/3.12.1/envs/.venv/lib/python3.12/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/regehr/shrinkray/src/shrinkray/__main__.py", line 423, in main
    event_loop = urwid.TrioEventLoop()
                 ^^^^^^^^^^^^^^^^^^^
AttributeError: module 'urwid' has no attribute 'TrioEventLoop'. Did you mean: 'EventLoop'?
(.venv) regehr@john-home:~/reduce$ 
regehr commented 9 months ago

I'm on commit 04775ef71ac9eb4e9652c2e2f14cbcdc99a77fb1 from today, on Ubuntu 22.04. I just now nuked and reinstalled pyenv since I might have borked something while messing around the other day. here's what I got while installing. (my pyenv virtualenv sems to want to create .venv in a location of its own choosing, not in the cwd as the shrinkray README.md suggests)

regehr@john-home:~/shrinkray$ /home/regehr/.pyenv/versions/.venv/bin/pip install -e .
Obtaining file:///home/regehr/shrinkray
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Preparing editable metadata (pyproject.toml) ... done
Collecting chardet<6.0.0,>=5.2.0 (from shrinkray==0.0.0)
  Obtaining dependency information for chardet<6.0.0,>=5.2.0 from https://files.pythonhosted.org/packages/38/6f/f5fbc992a329ee4e0f288c1fe0e2ad9485ed064cac731ed2fe47dcc38cbf/chardet-5.2.0-py3-none-any.whl.metadata
  Downloading chardet-5.2.0-py3-none-any.whl.metadata (3.4 kB)
Collecting click>=8.0.1 (from shrinkray==0.0.0)
  Obtaining dependency information for click>=8.0.1 from https://files.pythonhosted.org/packages/00/2e/d53fa4befbf2cfa713304affc7ca780ce4fc1fd8710527771b58311a3229/click-8.1.7-py3-none-any.whl.metadata
  Using cached click-8.1.7-py3-none-any.whl.metadata (3.0 kB)
Collecting humanize<5.0.0,>=4.9.0 (from shrinkray==0.0.0)
  Obtaining dependency information for humanize<5.0.0,>=4.9.0 from https://files.pythonhosted.org/packages/aa/2b/2ae0c789fd08d5b44e745726d08a17e6d3d7d09071d05473105edc7615f2/humanize-4.9.0-py3-none-any.whl.metadata
  Downloading humanize-4.9.0-py3-none-any.whl.metadata (7.9 kB)
Collecting libcst<2.0.0,>=1.1.0 (from shrinkray==0.0.0)
  Obtaining dependency information for libcst<2.0.0,>=1.1.0 from https://files.pythonhosted.org/packages/94/d9/2a2af5d477ea98af05534f76260647da308d20c0cdd10bc05107d2755b0f/libcst-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata
  Downloading libcst-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (17 kB)
Collecting trio<0.23.0,>=0.22.2 (from shrinkray==0.0.0)
  Obtaining dependency information for trio<0.23.0,>=0.22.2 from https://files.pythonhosted.org/packages/a3/dd/b61fa61b186d3267ef3903048fbee29132963ae762fb70b08d4a3cd6f7aa/trio-0.22.2-py3-none-any.whl.metadata
  Downloading trio-0.22.2-py3-none-any.whl.metadata (4.7 kB)
Collecting urwid<3.0.0,>=2.2.3 (from shrinkray==0.0.0)
  Obtaining dependency information for urwid<3.0.0,>=2.2.3 from https://files.pythonhosted.org/packages/fb/67/6ab2f21eeed4f74396a690c7c087b130489a5c8ad8bdcd338f456a2fb720/urwid-2.3.4-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata
  Downloading urwid-2.3.4-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (10.0 kB)
Collecting typing-extensions>=3.7.4.2 (from libcst<2.0.0,>=1.1.0->shrinkray==0.0.0)
  Obtaining dependency information for typing-extensions>=3.7.4.2 from https://files.pythonhosted.org/packages/b7/f4/6a90020cd2d93349b442bfcb657d0dc91eee65491600b2cb1d388bc98e6b/typing_extensions-4.9.0-py3-none-any.whl.metadata
  Downloading typing_extensions-4.9.0-py3-none-any.whl.metadata (3.0 kB)
Collecting typing-inspect>=0.4.0 (from libcst<2.0.0,>=1.1.0->shrinkray==0.0.0)
  Obtaining dependency information for typing-inspect>=0.4.0 from https://files.pythonhosted.org/packages/65/f3/107a22063bf27bdccf2024833d3445f4eea42b2e598abfbd46f6a63b6cb0/typing_inspect-0.9.0-py3-none-any.whl.metadata
  Downloading typing_inspect-0.9.0-py3-none-any.whl.metadata (1.5 kB)
Collecting pyyaml>=5.2 (from libcst<2.0.0,>=1.1.0->shrinkray==0.0.0)
  Obtaining dependency information for pyyaml>=5.2 from https://files.pythonhosted.org/packages/b4/33/720548182ffa8344418126017aa1d4ab4aeec9a2275f04ce3f3573d8ace8/PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata
  Downloading PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.1 kB)
Collecting attrs>=20.1.0 (from trio<0.23.0,>=0.22.2->shrinkray==0.0.0)
  Downloading attrs-23.1.0-py3-none-any.whl (61 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.2/61.2 kB 1.8 MB/s eta 0:00:00
Collecting sortedcontainers (from trio<0.23.0,>=0.22.2->shrinkray==0.0.0)
  Downloading sortedcontainers-2.4.0-py2.py3-none-any.whl (29 kB)
Collecting idna (from trio<0.23.0,>=0.22.2->shrinkray==0.0.0)
  Obtaining dependency information for idna from https://files.pythonhosted.org/packages/c2/e7/a82b05cf63a603df6e68d59ae6a68bf5064484a0718ea5033660af4b54a9/idna-3.6-py3-none-any.whl.metadata
  Downloading idna-3.6-py3-none-any.whl.metadata (9.9 kB)
Collecting outcome (from trio<0.23.0,>=0.22.2->shrinkray==0.0.0)
  Obtaining dependency information for outcome from https://files.pythonhosted.org/packages/55/8b/5ab7257531a5d830fc8000c476e63c935488d74609b50f9384a643ec0a62/outcome-1.3.0.post0-py2.py3-none-any.whl.metadata
  Downloading outcome-1.3.0.post0-py2.py3-none-any.whl.metadata (2.6 kB)
Collecting sniffio (from trio<0.23.0,>=0.22.2->shrinkray==0.0.0)
  Downloading sniffio-1.3.0-py3-none-any.whl (10 kB)
Collecting mypy-extensions>=0.3.0 (from typing-inspect>=0.4.0->libcst<2.0.0,>=1.1.0->shrinkray==0.0.0)
  Downloading mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB)
Downloading chardet-5.2.0-py3-none-any.whl (199 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 199.4/199.4 kB 5.7 MB/s eta 0:00:00
Using cached click-8.1.7-py3-none-any.whl (97 kB)
Downloading humanize-4.9.0-py3-none-any.whl (126 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 126.8/126.8 kB 25.5 MB/s eta 0:00:00
Downloading libcst-1.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.2 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 34.2 MB/s eta 0:00:00
Downloading trio-0.22.2-py3-none-any.whl (400 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 400.2/400.2 kB 86.6 MB/s eta 0:00:00
Downloading urwid-2.3.4-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (275 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 275.1/275.1 kB 51.7 MB/s eta 0:00:00
Downloading PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (724 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 725.0/725.0 kB 86.2 MB/s eta 0:00:00
Downloading typing_extensions-4.9.0-py3-none-any.whl (32 kB)
Downloading typing_inspect-0.9.0-py3-none-any.whl (8.8 kB)
Downloading idna-3.6-py3-none-any.whl (61 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.6/61.6 kB 20.2 MB/s eta 0:00:00
Downloading outcome-1.3.0.post0-py2.py3-none-any.whl (10 kB)
Building wheels for collected packages: shrinkray
  Building editable for shrinkray (pyproject.toml) ... done
  Created wheel for shrinkray: filename=shrinkray-0.0.0-py3-none-any.whl size=4414 sha256=e87cc50bf8a07d06fd57ffa68ce933e42ef8ce3a7bb4f72a0cc5d681e654794a
  Stored in directory: /tmp/pip-ephem-wheel-cache-xdy6vizj/wheels/5f/c3/25/6137131e9c662a6891fa43bd4155ade7cfbb508c8aee4d2f31
Successfully built shrinkray
Installing collected packages: sortedcontainers, urwid, typing-extensions, sniffio, pyyaml, mypy-extensions, idna, humanize, click, chardet, attrs, typing-inspect, outcome, trio, libcst, shrinkray
Successfully installed attrs-23.1.0 chardet-5.2.0 click-8.1.7 humanize-4.9.0 idna-3.6 libcst-1.1.0 mypy-extensions-1.0.0 outcome-1.3.0.post0 pyyaml-6.0.1 shrinkray-0.0.0 sniffio-1.3.0 sortedcontainers-2.4.0 trio-0.22.2 typing-extensions-4.9.0 typing-inspect-0.9.0 urwid-2.3.4

[notice] A new release of pip is available: 23.2.1 -> 23.3.2
[notice] To update, run: /home/regehr/.pyenv/versions/3.12.1/envs/.venv/bin/python3.12 -m pip install --upgrade pip
DRMacIver commented 8 months ago

Sorry, this one's not you doing anything wrong, this is a mix of my having failed to update the packaging properly to reflect some changes in a new version of urwid, and urwid giving particularly bad error messages when you miss out a dependency.

If you update to the latest version of main, this should be fixed.

regehr commented 8 months ago

working fine now, thanks!