You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have tried to work with pycozo.builder to construct CozoScript (0.7.2) queries programmatically.
from pycozo.builder import (Var, Const,
InputParam, InputObject, InputList, InputRelation, InputProgram,
OpApply, Sorter, RuleHead, RuleApply, ProximityApply,
StoreOp, StoredRuleApply, StoredRuleNamedApply,
Conjunction, Disjunction, Negation, Bind, Cond, RawAtom,
FixedRule, InlineRule, ConstantRule)
ImportError Traceback (most recent call last)
Cell In[2], line 1
----> 1 from pycozo.builder import (Var, Const,
2 InputParam, InputObject, InputList, InputRelation, InputProgram,
3 OpApply, Sorter, RuleHead, RuleApply, ProximityApply,
4 StoreOp, StoredRuleApply, StoredRuleNamedApply,
5 Conjunction, Disjunction, Negation, Bind, Cond, RawAtom,
6 FixedRule, InlineRule, ConstantRule)
File ~/anaconda3/envs/KGTK/lib/python3.9/site-packages/pycozo/builder.py:9
7 from enum import Enum
8 from dataclasses import dataclass, field
----> 9 from typing import Any, TypeAlias, Union
12 @dataclass
13 class Var:
14 name: str
ImportError: cannot import name 'TypeAlias' from 'typing' (~/anaconda3/envs/KGTK/lib/python3.9/typing.py)
NOTICE: The python environment that I tried the script above is based on Python 3.9, I have also tried with Python 3.10 and the problem with typing library disappeared. Code in test_builder.py works fine with Python 3.10
The text was updated successfully, but these errors were encountered:
Hi, I have tried to work with
pycozo.builder
to construct CozoScript (0.7.2) queries programmatically.NOTICE: The python environment that I tried the script above is based on Python 3.9, I have also tried with Python 3.10 and the problem with
typing
library disappeared. Code in test_builder.py works fine with Python 3.10The text was updated successfully, but these errors were encountered: