no prodigy.json file

Hello,

I am french and i will do my best in english :wink:
I bought prodigy yesterday, installation worked but prodigy.json is not present.
I tried to create it but when i start :
python3.6 -m prodigy news_headlines test_dataset “Silicon Valley” -F /home/a.dumas/python/code/prodigy/recipe_test.py

if i create my own prodigy.json file :

Traceback (most recent call last):
File “/usr/lib64/python3.6/runpy.py”, line 193, in _run_module_as_main
main”, mod_spec)
File “/usr/lib64/python3.6/runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “/usr/lib64/python3.6/site-packages/prodigy/main.py”, line 256, in
server(controller, controller.config)
File “/usr/lib64/python3.6/site-packages/prodigy/app.py”, line 28, in server
help_path = Path(config[‘instructions’])
File “/usr/lib64/python3.6/pathlib.py”, line 979, in new
self = cls._from_parts(args, init=False)
File “/usr/lib64/python3.6/pathlib.py”, line 654, in _from_parts
drv, root, parts = self._parse_args(args)
File “/usr/lib64/python3.6/pathlib.py”, line 638, in _parse_args
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not boolstrong text

if not => prodigy say “Error : Can’t fetch project and tasks, make sure the server is running correctly”

OS is CentOS 7.4 x64.

Do you have an idea ?

Thanks.

Merci! :blush:

Thanks for the report! I think the problem here is that Prodigy will look for a .prodigy directory in your user home that contains a file prodigy.json. If it doesn't exist, Prodigy will try to create it – and for some reason, this seems to fail in your case. (Maybe it's something related to user permissions?) You can always use the PRODIGY_HOME environment variable to specify a custom home directory for Prodigy.

Did you copy-paste the prodjgy.json defaults from the docs? I think we made a mistake in our prodigy.json docs and/or the way the server reads in this value of "instructions". So if your prodigy.json has "instructions": false or something similar, try removing that!

We currently check if "instructions" exists and then assume it's a file – instead, we should check if it exists and is a string (and not false) before using it. That's why it fails on this line:

help_path = Path(config[‘instructions’])

i am using PRODIGY_HOME environment variable.
echo $PRODIGY_HOME => /home/a.dumas/prodigy (created manually too)

And i copy-paste the prodigy.json default from website (https://prodi.gy/docs/install).

Instructions has been removed and it’s ok now.

Thanks for your help.

1 Like

Thanks for updating, glad it worked! I’ve already fixed the problem in Prodigy and it will be included in the next release :+1:

Edit: Just released v1.4.1, which should handle "instructions": false properly!