prodigy.json setting causes web app error

Good afternoon people,

I’m trying to use the system, but regardless of the command line (be it ner.manual, ner.teach, or others), I always get this error, even using your examples as: prodigy ner.teach my_set en_core_web_sm news_headlines.jsonl

What can it be? I wait, thanks.

And the console is experiencing this error:
bundle.js:1 Error: Minified React error #62; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=62&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
at d (bundle.js:1)
at _o (bundle.js:1)
at No (bundle.js:1)
at finalizeInitialChildren (bundle.js:1)
at completeWork (bundle.js:1)
at n (bundle.js:1)
at r (bundle.js:1)
at i (bundle.js:1)
at a (bundle.js:1)
at S (bundle.js:1)
u @ bundle.js:1

The rating, accept or reject, is working, but the text does not appear, just the error message

Resolved, for those who go through the same situation, my solution in the case was to leave the
‘prodigy.json’, that is, not creating the file.

@djpremier Could you share what was in your prodigy.json before? Of course, I’m glad it works now, but removing your settings shouldn’t be a solution. I suspect there’s a problem with one setting and the front-end doesn’t handle this properly – for example, the setting might have an unexpected type. So I’d love to investigate that! :slightly_smiling_face:

Now that we have the JSON schemas implemented that validate the stream, I’ll also add validation for the prodigy.json. This means that if something in the settings doesn’t look as expected, Prodigy won’t even start the server and instead, output a message with details on what’s wrong.

oo, that was to fast;)
Opening the webapp I got
“Oops, something went wrong :frowning:
You might have come across a bug in Prodigy’s web app – sorry about that. We’d love to fix this, so feel free to open an issue on the Prodigy Support Forum and include the steps that led to this message.”

and in the console
“Error: Minified React error #62

What to do here?

the react side told me:
"The full text of the error you just encountered is:

The style prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + ‘em’}} when using JSX."

Thanks for looking into this! And hmm, this is strange. Do you have any special customisations in your prodigy.json? Like, a card_css or something similar?

no, it’s just empty.
{

}

Hmm, this is very mysterious and I can’t reproduce this error yet, especially not with the fairly simple text classification setup and interface. I really can’t see where this would be coming from :thinking:

Could you post the exact command you ran? And if you run the command with the environment variable PRODIGY_LOGGING=verbose, is there anything in the config that looks suspicious? (The output after “CONTROLLER: Initialising from recipe”.)

@ines same issue.
I’m running this command:
prodigy my_recipe org_relations ‘/path/to/model’ data.jsonl -F my_recipe.py
Here is the log. There seems to be no trace of error.
It is running on Mac but not on Ubuntu 16.04

Thanks for the report – this is really bizarre. Trying my best to reproduce it. Prodigy practically never sets style manually, except for user settings like the card_css and in some of the image interfaces…

Does this only happen in the classification interface or everywhere?

Tried with ner, same issue. Though on mac all interfaces seem to be working.

hier is my log:
"python -m prodigy ner.teach ensi_set de_core_news_sm “G:/OneDrive - Bircomp GmbH/Bircomp/Projekte/Entwicklung/AI/Tools/Wortindex/ENSI-Texte/ensi_de_utf8.txt”
14:39:57 - RECIPE: Calling recipe ‘ner.teach’
14:39:57 - RECIPE: Starting recipe ner.teach
{‘spacy_model’: ‘de_core_news_sm’, ‘loader’: None, ‘patterns’: None, ‘exclude’: None, ‘api’: None, ‘source’: ‘G:/OneDrive - Bircomp GmbH/Bircomp/Projekte/Entwicklung/AI/Tools/Wortindex/ENSI-Texte/ensi_de_utf8.txt’, ‘unsegmented’: False, ‘label’: None, ‘dataset’: ‘ensi_set’}

14:39:57 - LOADER: Using file extension ‘txt’ to find loader
G:/OneDrive - Bircomp GmbH/Bircomp/Projekte/Entwicklung/AI/Tools/Wortindex/ENSI-Texte/ensi_de_utf8.txt

14:39:57 - LOADER: Loading stream from txt
14:39:57 - LOADER: Rehashing stream
14:39:58 - RECIPE: Creating EntityRecognizer using model de_core_news_sm
14:39:59 - MODEL: Added sentence boundary detector to model pipeline
[‘sbd’, ‘tagger’, ‘parser’, ‘ner’]

14:39:59 - SORTER: Resort stream to prefer uncertain scores (bias 0.0)
14:39:59 - CONTROLLER: Initialising from recipe
{‘stream’: <prodigy.components.sorters.ExpMovingAverage object at 0x0000022236687278>, ‘dataset’: ‘ensi_set’, ‘on_load’: None, ‘self’: <prodigy.core.Controller object at 0x0000022236687390>, ‘exclude’: None, ‘get_session_id’: None, ‘on_exit’: None, ‘progress’: <prodigy.components.progress.ProgressEstimator object at 0x00000222366872E8>, ‘config’: {‘dataset’: ‘ensi_set’, ‘port’: 8080, ‘auto_create’: True, ‘show_bounding_box_center’: False, ‘host’: ‘localhost’, ‘choice_style’: ‘single’, ‘ner_manual_require_click’: False, ‘diff_style’: ‘words’, ‘theme’: ‘basic’, ‘ner_manual_label_style’: ‘list’, ‘split_sents_threshold’: False, ‘writing_dir’: ‘ltr’, ‘batch_size’: 10, ‘preview_bounding_boxes’: False, ‘show_stats’: False, ‘custom_theme’: {}, ‘choice_auto_accept’: False, ‘api_keys’: {}, ‘show_flag’: False, ‘label’: ‘all’, ‘instructions’: False, ‘db_settings’: {}, ‘swipe’: False, ‘hide_meta’: False, ‘shade_bounding_boxes’: False, ‘html_template’: False, ‘darken_image’: 0, ‘card_css’: False, ‘cors’: True, ‘db’: ‘sqlite’, ‘lang’: ‘de’}, ‘update’: <bound method EntityRecognizer.update of <prodigy.models.ner.EntityRecognizer object at 0x00000222228747F0>>, ‘view_id’: ‘ner’, ‘db’: True}

14:39:59 - VALIDATE: Creating validator for view ID ‘ner’
14:39:59 - DB: Initialising database SQLite
14:39:59 - DB: Connecting to database SQLite
14:39:59 - DB: Loading dataset ‘ensi_set’ (0 examples)
14:39:59 - DB: Creating dataset ‘2018-06-13_14-39-59’
{‘created’: datetime.datetime(2018, 6, 13, 11, 45, 19), ‘description’: ‘ENSI-2017’, ‘author’: ‘RalfBendzko’}

14:39:59 - CONTROLLER: Validating the first batch
14:39:59 - CONTROLLER: Iterating over stream
14:39:59 - PREPROCESS: Splitting sentences
{‘stream’: <generator object at 0x00000222227C0168>, ‘min_length’: None, ‘batch_size’: 32, ‘nlp’: <spacy.lang.de.German object at 0x00000222228745C0>, ‘text_key’: ‘text’}

14:39:59 - FILTER: Filtering duplicates from stream
{‘by_input’: True, ‘stream’: <generator object at 0x00000222227C0048>, ‘by_task’: True}

14:39:59 - FILTER: Filtering out empty examples for key ‘text’
14:39:59 - FILTER: Skipping invalid ‘text’ task
{‘text’: ‘’, ‘_task_hash’: 1839039364, ‘_input_hash’: 616230852}

14:40:00 - MODEL: Predicting spans for batch (batch size 64)
14:40:00 - MODEL: Sorting batch by entity type (batch size 32)

? Starting the web server at http://localhost:8080
Open the app in your browser and start annotating!"

interestingly,
the buttons on the web-GUI do work.
But the error message does not disappear and fills the whole screen.

@mayurbhangale I just had a look at your log and it lists the version as 'version': '1.5.0'. So maybe something didn't upgrade correctly? This might also explain the platform differences (because in general, it's pretty mysterious why the web app would work on one system and not on the other – usually, this would always indicate a deeper problem with the back-end serving the front-end.)

Yeah, if possible, the Prodigy app always tries to localise the error and will only fail on the part that's causing it, so you never get a full crash. As a quick sanity check, the log for GET: /get_questions (after the server started) correctly shows 1.5.1 as the version? And if you run prodigy stats, the version is also correct?

@ines Clean Installed in multiple environments. Same error.
It does seem to respond to buttons and save annotations.

version:
(spacy_e) C:\WINDOWS\system32>python -m prodigy stats
15:28:55 - DB: Initialising database SQLite
15:28:55 - DB: Connecting to database SQLite

? Prodigy stats

Location C:\Anaconda3\envs\spacy_e\lib\site-packages\prodigy
Version 1.5.1
Total Datasets 2
Database Name SQLite
Prodigy Home G:\OneDrive - Bircomp GmbH\ralf\Documents.prodigy
Platform Windows-10-10.0.17134-SP0
Database Id sqlite
Total Sessions 10
Python Version 3.5.4

@mayurbhangale I was just asking because your log shows version 1.5.0 and this usually means that at least the about.py of the package is the one shipped with the previous version (since this is where the version identifier is taken from).

@Ralf Thanks for your patience! I’ve been pulling my hair out over this for the past hour or so :exploding_head: But I think I might have the solution: in your prodigy.json, try setting the following explicitly:

"card_css": {}

You can also remove the entry from your prodigy.json – based on your log, it looks like you likely have a prodigy.json file somewhere (usually in your home directory in .prodigy) that’s populated with some default values, including "card_css": false. This was the default suggested in the docs – but under certain circumstances, it would actually cause this error.

I’ve already adjusted the documentation accordingly. It’s especially frustrating because we actually planned on shipping JSON schema-based prodigy.json validation in v1.5.1 that would have output a warning for exactly that – but we decided against it because we wanted to give it more thorough testing :weary:

2 Likes

Thank you very much!!!

  1. you have been right, I had a second prodigy.json with the entry “card_css”: false.
  2. altering the entry to “card_css”: {}, did the trick.
3 Likes

Ahhhh, I’m so glad it worked :tada: Sorry again! I’ve already added the fix to prevent this sort of stuff in the next version. I also moved the posts over to this thread, which turned out to be related to the same problem.

2 Likes

Thank you so much for this thread. I was going crazy this morning after updating to 1.5.1. But the trick with the css value solved the issue. But serious: In my case there was no error message at all. Just this meaningless Oops-Error in the Frontend. Not helpful to find the error by my own!