sigma-py / quadpy

:triangular_ruler: Numerical integration (quadrature, cubature) in Python
757 stars 82 forks source link

ValueError: Need x21 < 0.3 (also why is the code encrypted?) #454

Closed gridley closed 1 year ago

gridley commented 2 years ago

Hey,

I'm trying to run quadpy with a pip installation. I'm using pip 22.2.1 with python3.10. Just tried upgading both quadpy and x21, yet the issue with x21 is not resolved. Any suggestions?

Also, I remember back when these packages were open source. Now it seems that we are getting encrypted python code distributed over PyPI, which I am a bit uncomfortable about. Without open source code to match a hash against, what's stopping malicious code from being deployed here? It has happened in PyPI before...

nschloe commented 2 years ago

It'll be hard to give advice without concrete commands + error outputs.

Also, I remember back when these packages were open source. Now it seems that we are getting encrypted python code distributed over PyPI, which I am a bit uncomfortable about. Without open source code to match a hash against, what's stopping malicious code from being deployed here? It has happened in PyPI before...

The package will remain closed-source for now. There won't be "malicious code", but I understand if you feel uncomfy. Best use something else if it bothers you too much.

gridley commented 2 years ago

Aight, thanks!

>>> import quadpy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/gavin/.local/lib/python3.10/site-packages/quadpy/__init__.py", line 3, in <module>
    __dex_22b__(
  File "/home/gavin/.local/lib/python3.10/site-packages/x21/_main.py", line 32, in __dex_22b__
    _x21.decrypt_and_exec_22b(smessage, iv, glob)
  File "<string>", line 2, in <module>
  File "/home/gavin/.local/lib/python3.10/site-packages/quadpy/c1/__init__.py", line 3, in <module>
    __dex_22b__(
  File "/home/gavin/.local/lib/python3.10/site-packages/x21/_main.py", line 32, in __dex_22b__
    _x21.decrypt_and_exec_22b(smessage, iv, glob)
  File "<string>", line 2, in <module>
  File "/home/gavin/.local/lib/python3.10/site-packages/quadpy/c1/_adaptive.py", line 3, in <module>
    __dex_22b__(
  File "/home/gavin/.local/lib/python3.10/site-packages/x21/_main.py", line 32, in __dex_22b__
    _x21.decrypt_and_exec_22b(smessage, iv, glob)
  File "<string>", line 8, in <module>
  File "/home/gavin/.local/lib/python3.10/site-packages/quadpy/c1/_gauss_kronrod.py", line 3, in <module>
    __dex_22b__(
  File "/home/gavin/.local/lib/python3.10/site-packages/x21/_main.py", line 32, in __dex_22b__
    _x21.decrypt_and_exec_22b(smessage, iv, glob)
  File "<string>", line 9, in <module>
  File "/home/gavin/.local/lib/python3.10/site-packages/quadpy/c1/_gauss_legendre.py", line 3, in <module>
    __dex_22b__(
  File "/home/gavin/.local/lib/python3.10/site-packages/x21/_main.py", line 32, in __dex_22b__
    _x21.decrypt_and_exec_22b(smessage, iv, glob)
  File "<string>", line 3, in <module>
  File "/home/gavin/.local/lib/python3.10/site-packages/orthopy/__init__.py", line 3, in <module>
    __dex__(globals(), "22a", b'x\xf8C\xb4A\xaf\xc2wF+\r\x19\x8d\xfb\x15\xb9\xde\xd8\xbb\xc6\'\xf9\xbf\xae\xb1\t8\xd9XH@D\xc9Ph\x07\xf6\xd2g\xc48\xc3Z)aV\xc0\xc6ar\x8c\xd7\x12\xbe\xa0\x02~\x05\xe2\xdfV\xa9\x84\x9ag\x17\x88\xdd\xd0e\x14i\xdfr"6N"J\x1c\xd8\x05{\x9e\xf4\x08\xaeF\xb9\x92C=\xa3I\x96Y/\xb1\xdc\xdd\xc3\x02\xd121\x9ccn\x11#\x8c\xa1\xfbF\xa7\xd3\xe3\xcdh\xcf\x801\x0f\x82)\xd5\x1e~\xc3\xe1&\x1b4\x95J\x13Z\x85%\xf6c%0\x9c\xb5\xd0\xe7\xfb\xe0L\xda\x01\xdc\xfd\x86\xcc\xc9\xb9\'\xb8x\xeb\xa6\t\xd0eF\x8a\xb5\xfe\xf8\xdd\xabF\x86\x9a\x1e\x86\xd9h\x0e{\xf2W\xf3t\x16\x0cm2\xa0\x08\x0b\xd7\xa1\x0e\xf1*B\xb3\x81\xbf\xc1H#\xeb>3\xc5\xa3Ic|0^\xd3\xdc|\xa9\xafi\x80\xa9\x8b\xcf\xc3\xbd\x05\x1aX\x808f#\xb8\xcaX#38Rm\xa9\x1d/7\x91\xd79+\x84i\x12&\xde\xdf\xee\xda\x17\xee\x83\xa9\x7fd~\xc3\xfb\xc1\xb8K\x03\xffGbxr\xb2\x9f\x14L\x08\xec\xd2\xb0\xfd]\x9a\xf8\x87Bj1\x11\xc3f3\xca\xa7\rl7\r\x17\xeb@\xe7>%\x0ex\xc4\x8b\x17tu\xf2a\x9c\x8b2\x9bE\x02\x91+\xbe\x9cT\xd9\xff\xb4P\xc1zQ\xf2"V')
  File "/home/gavin/.local/lib/python3.10/site-packages/x21/_main.py", line 28, in __dex__
    raise ValueError("Need x21 < 0.3")
ValueError: Need x21 < 0.3
>>>

My reaction to formerly good code that a user can't fix themself:

image

nschloe commented 2 years ago

What's your quadpy version?

gridley commented 2 years ago

gpad% pip3 list | grep quadpy quadpy 0.16.16

gpad% pip3 list | grep x21 x21 0.3.3

nschloe commented 2 years ago

What's

import quadpy 

print(quadpy.__version__)

?

gridley commented 2 years ago

Yeah, can't even import it; that's the trouble!

gpad% python
Python 3.10.5 (main, Jun  6 2022, 18:49:26) [GCC 12.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import quadpy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/gavin/.local/lib/python3.10/site-packages/quadpy/__init__.py", line 3, in <module>
    __dex_22b__(
  File "/home/gavin/.local/lib/python3.10/site-packages/x21/_main.py", line 32, in __dex_22b__
    _x21.decrypt_and_exec_22b(smessage, iv, glob)
  File "<string>", line 2, in <module>
  File "/home/gavin/.local/lib/python3.10/site-packages/quadpy/c1/__init__.py", line 3, in <module>
    __dex_22b__(
  File "/home/gavin/.local/lib/python3.10/site-packages/x21/_main.py", line 32, in __dex_22b__
    _x21.decrypt_and_exec_22b(smessage, iv, glob)
  File "<string>", line 2, in <module>
  File "/home/gavin/.local/lib/python3.10/site-packages/quadpy/c1/_adaptive.py", line 3, in <module>
    __dex_22b__(
  File "/home/gavin/.local/lib/python3.10/site-packages/x21/_main.py", line 32, in __dex_22b__
    _x21.decrypt_and_exec_22b(smessage, iv, glob)
  File "<string>", line 8, in <module>
  File "/home/gavin/.local/lib/python3.10/site-packages/quadpy/c1/_gauss_kronrod.py", line 3, in <module>
    __dex_22b__(
  File "/home/gavin/.local/lib/python3.10/site-packages/x21/_main.py", line 32, in __dex_22b__
    _x21.decrypt_and_exec_22b(smessage, iv, glob)
  File "<string>", line 9, in <module>
  File "/home/gavin/.local/lib/python3.10/site-packages/quadpy/c1/_gauss_legendre.py", line 3, in <module>
    __dex_22b__(
  File "/home/gavin/.local/lib/python3.10/site-packages/x21/_main.py", line 32, in __dex_22b__
    _x21.decrypt_and_exec_22b(smessage, iv, glob)
  File "<string>", line 3, in <module>
  File "/home/gavin/.local/lib/python3.10/site-packages/orthopy/__init__.py", line 3, in <module>
    __dex__(globals(), "22a", b'x\xf8C\xb4A\xaf\xc2wF+\r\x19\x8d\xfb\x15\xb9\xde\xd8\xbb\xc6\'\xf9\xbf\xae\xb1\t8\xd9XH@D\xc9Ph\x07\xf6\xd2g\xc48\xc3Z)aV\xc0\xc6ar\x8c\xd7\x12\xbe\xa0\x02~\x05\xe2\xdfV\xa9\x84\x9ag\x17\x88\xdd\xd0e\x14i\xdfr"6N"J\x1c\xd8\x05{\x9e\xf4\x08\xaeF\xb9\x92C=\xa3I\x96Y/\xb1\xdc\xdd\xc3\x02\xd121\x9ccn\x11#\x8c\xa1\xfbF\xa7\xd3\xe3\xcdh\xcf\x801\x0f\x82)\xd5\x1e~\xc3\xe1&\x1b4\x95J\x13Z\x85%\xf6c%0\x9c\xb5\xd0\xe7\xfb\xe0L\xda\x01\xdc\xfd\x86\xcc\xc9\xb9\'\xb8x\xeb\xa6\t\xd0eF\x8a\xb5\xfe\xf8\xdd\xabF\x86\x9a\x1e\x86\xd9h\x0e{\xf2W\xf3t\x16\x0cm2\xa0\x08\x0b\xd7\xa1\x0e\xf1*B\xb3\x81\xbf\xc1H#\xeb>3\xc5\xa3Ic|0^\xd3\xdc|\xa9\xafi\x80\xa9\x8b\xcf\xc3\xbd\x05\x1aX\x808f#\xb8\xcaX#38Rm\xa9\x1d/7\x91\xd79+\x84i\x12&\xde\xdf\xee\xda\x17\xee\x83\xa9\x7fd~\xc3\xfb\xc1\xb8K\x03\xffGbxr\xb2\x9f\x14L\x08\xec\xd2\xb0\xfd]\x9a\xf8\x87Bj1\x11\xc3f3\xca\xa7\rl7\r\x17\xeb@\xe7>%\x0ex\xc4\x8b\x17tu\xf2a\x9c\x8b2\x9bE\x02\x91+\xbe\x9cT\xd9\xff\xb4P\xc1zQ\xf2"V')
  File "/home/gavin/.local/lib/python3.10/site-packages/x21/_main.py", line 28, in __dex__
    raise ValueError("Need x21 < 0.3")
ValueError: Need x21 < 0.3
nschloe commented 1 year ago

Hard to say what's going wrong. Have to tried installing x21 < 0.3?

nschloe commented 1 year ago

Closing for lack of feedback. Feel free to reopen at any time!