Closed DrLynch closed 1 year ago
This problem persists with the latest GitHub sources as well:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/username/Teaching/AIAcademy/Intro-to-AI-Cohort-3-2022/WorkshopMaterials/AIAWorkshopRepo/Week-04/Code/kanren/kanren/core.py", line 238, in run
return tuple(results)
File "/home/username/Teaching/AIAcademy/Intro-to-AI-Cohort-3-2022/WorkshopMaterials/AIAWorkshopRepo/Week-04/Code/kanren/kanren/core.py", line 104, in lconj_seq_goal
yield from reduce(bind, _goals, g0(S))
File "/home/username/Teaching/AIAcademy/Intro-to-AI-Cohort-3-2022/WorkshopMaterials/AIAWorkshopRepo/Week-04/Code/kanren/kanren/core.py", line 104, in lconj_seq_goal
yield from reduce(bind, _goals, g0(S))
TypeError: 'tuple' object is not callable
It looks like you're using the tuple
-based approach to defining goals from LogPy (e.g. (eq, a, b)
). When using this fork, those tuples can be replaced by actual calls on the goals (e.g. eq(a, b)
).
The rewritten zebra example is here and it appears to work in Python 3.10, so I'll close this for now.
Greetings, when I run a basic example of the zebra problem with miniKanren 1.0.3 under python3.10 I receive a type error. The minimal example is:
Executing this code in the interpreter or a file yields the following error: