Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example from README do not work for prg.evaluate function #80

Open
msergg opened this issue Dec 4, 2024 · 1 comment
Open

Example from README do not work for prg.evaluate function #80

msergg opened this issue Dec 4, 2024 · 1 comment

Comments

@msergg
Copy link

msergg commented Dec 4, 2024

Example from README do not work for prg.evaluate function

import celpy
from celpy import CELEvalError

env = celpy.Environment()

# Press the green button in the gutter to run the script.
if __name__ == '__main__':
    all_positive = "data.all(x, x>0)"
    breaks = {'data': [1, 2, 3] }

    ast = env.compile(all_positive)
    prgm = env.program(ast)

    prgm.evaluate(breaks)
   .venv/lib/python3.13/site-packages/celpy/evaluation.py", line 1461, in relation
    }[left_op.data]
      ^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'data'

python -V
Python 3.13.0

@msergg
Copy link
Author

msergg commented Dec 4, 2024

Solution is to use python 3.12 o lower

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant