[英]How can I solve this error while importing inflect package?
我嘗試運行 inflect 文檔https://pypi.org/project/inflect/中的代碼,但出現值錯誤。
import inflect
p = inflect.engine()
word = 'cat'
cat_count = 10
print("The plural of ", word, " is ", p.plural(word))
print("I saw", cat_count, p.plural("cat", cat_count))
我得到錯誤:
ValueError: `Field` default cannot be set in `Annotated` for 'num_Annotated[str, FieldInfo(min_length=1, extra={})]'
我嘗試刪除並重新安裝 package 但沒有任何改變。 我該如何解決這個問題?
這似乎是您的版本( source )的錯誤。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.