ValueError: Can't read file: patterns\amt_patterns2021-10-12.jsonl\cfg #9485
-
I would appreciate some assistance with understanding this error message. I am using three entity rulers in this code. Their patterns files seem identical and were produced in the same way. Their details and settings are the same. But this is the only patterns file (json lines file) giving me an error message. Strangely, I cannot find any reference to this error message elsewhere. Thank you in advance for your sincere feedback.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Do you have an extra path delimiter at the end of the path you're passing to EntityRuler.from_disk? It seems to be treating whatever you're passing in as a directory, and is trying to read the entity ruler's config file within as a result. # NO
entity_ruler.from_disk("patterns/amt_patterns2021-10-12.jsonl/")
# YES
entity_ruler.from_disk("patterns/amt_patterns2021-10-12.jsonl") |
Beta Was this translation helpful? Give feedback.
-
Does the file actually exist? I know it's a silly thing, but just to be sure... One thing is that the filename you give ends in a 12 for that component but 11 for the others, is that correct? Is it possible you have a failing SSD, or some network share status that makes the file behave strangely? It looks like you're using forward slashes in code, but backslashes are showing up in your traceback. This is a longshot, but maybe Those are all kind of longshots, but file writing and reading is rather low-level, so if the problem is there it's hard to be sure what's happening without being able to check your system. |
Beta Was this translation helpful? Give feedback.
Do you have an extra path delimiter at the end of the path you're passing to EntityRuler.from_disk? It seems to be treating whatever you're passing in as a directory, and is trying to read the entity ruler's config file within as a result.