OSError: An attempt was made to access a socket in a way forbidden by its access permissions

Hi - I’m trying to use textcat.eval on a Windows machine. I can’t seem to get it working with a jsonl file containing the examples I want to evaluate on. I’ve tried:

python -m prodigy textcat.eval products_textcat_eval models\product_cat data\processed\train_paragraphs.jsonl --label

which gets me:
OSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions

I read the documentation and it seems like it would work with stdin, but if I try this way:

python -m prodigy pipe data\processed\train_paragraphs.jsonl | python -m prodigy textcat.eval products_textcat_eval models\product_cat --label

I first get an error indicating that ‘Source’ is a required argument, and when I supply something for source I get the socket error again. Is there something I’m missing here?

Ah, sorry about that – it seems like the textcat.eval recipe doesn’t correctly default source to None. This was already reported in this thread and will be fixed in the next release.

I just googled that strange error message and I’m not sure it’s actually related to the file – maybe it occurs when Prodigy tries to start up the web server? Could you check that there’s nothing else running on the host and port? (By default, localhost:8080.) And what happens when you change the port? (Either by setting "port" in your prodigy.json or via the environment variable PRODIGY_PORT.) Maybe serving on 8080 is blocked for some reason?

Ohhhh - that was it, I had NiFi running on 8080. Thanks!!

1 Like