Prodigy recipes no longer work after spacy upgrade

Hi all,

I'm using:
Windows 10
Python 3.8

I was running Prodigy on my machine but then I upgraded spaCy (3.1.2->3.1.3) and when I tried to run any Prodigy recipe I was met with:

C:\Windows\system32>python -m prodigy stats -l
Traceback (most recent call last):
  File "C:\Users\RossMarino\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 185, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "C:\Users\RossMarino\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 144, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "C:\Users\RossMarino\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "C:\Users\RossMarino\AppData\Local\Programs\Python\Python38\lib\site-packages\prodigy\__init__.py", line 1, in <module>
    from .util import init_package
  File "cython_src\prodigy\util.pyx", line 55, in init prodigy.util
  File "C:\Users\RossMarino\AppData\Local\Programs\Python\Python38\lib\pathlib.py", line 1391, in exists
    self.stat()
  File "C:\Users\RossMarino\AppData\Local\Programs\Python\Python38\lib\pathlib.py", line 1197, in stat
    return self._accessor.stat(self)
OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: 'C:\\USERS\\RossMarino"'

Solutions I've tried:

  • Reverting back to spaCy 3.1.2 (pip --force-reinstall).
  • Creating a new environment in conda and installing prodigy there and ran into the same error. (python 3.8)
  • Python versions 3.8, 3.9, 3.10
  • Re-installing prodigy from .whl files (on fresh env)

I'm really not sure how to correct the filename syntax. I know this might be somewhat off topic, but I'm wondering if anyone has any ideas.

Thanks!

Ross

Hi! This is definitely very confusing and I've never seen this problem before :thinking: Just to confirm, are you setting a custom PRODIGY_HOME environment variable? If so, can you double-check that it's set correctly? The path it reports includes a " at the end, so maybe that's the problem?

If you're not customising the PRODIGY_HOME, that's definitely strange. The error happens when Prodigy checks if a .prodigy in the user home exists, and the default home directory it uses is pathlib.Path.home(). So this should always return a valid directory path that pathlib can handle. So I have no idea how this could happen. As a workaround, you could try setting the PRODIGY_HOME environment variable manually, e.g. export PRODIGY_HOME=C:\USERS\RossMarino.

1 Like

Ines, you're a life-saver! Thank you!

My PRODIGY_HOME variable had an extra " at the end because I was messing around with it. For anyone else who did this running Windows:

C:\Users\RossMarino>setx PRODIGY_HOME "C:\Users\RossMarino"

SUCCESS: Specified value was saved.

Then make sure you restart your command prompt to view the updated variable with echo %PRODIGY_HOME%

Thanks again!

Ross

1 Like