Open giantke opened 1 year ago
I found the above errors occur when processing the code
classifier.classify(loader.collection)
in label.py
After the above errors, incorrect classification results can still be obtained in the final CSV file. I'm so confused, anybody help me
I have the same questions,when I run 'python label.py reports_path 'sample_reports.csv': /home/zoule/anaconda3/envs/chexpert-label/lib/python3.6/site-packages/StanfordDependencies/JPypeBackend.py:160: UserWarning: This jar doesn't support universal dependencies, falling back to Stanford Dependencies. To suppress this message, call with universal=False warnings.warn("This jar doesn't support universal " ERROR:root:Cannot process sentence 0 in 0 Traceback (most recent call last): File "/media/zoule/Elements/chexpert-labeler/chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 120, in convert_doc has_lemmas=self._backend == 'jpype') File "/media/zoule/Elements/chexpert-labeler/chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 171, in convert_dg index = text.find(node_form, start) TypeError: must be str, not java.lang.String ERROR:root:Cannot process sentence 39 in 0 Traceback (most recent call last): File "/media/zoule/Elements/chexpert-labeler/chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 120, in convert_doc has_lemmas=self._backend == 'jpype') File "/media/zoule/Elements/chexpert-labeler/chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 171, in convert_dg index = text.find(node_form, start) TypeError: must be str, not java.lang.String ERROR:root:Cannot process sentence 62 in 0 Traceback (most recent call last): File "/media/zoule/Elements/chexpert-labeler/chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 120, in convert_doc has_lemmas=self._backend == 'jpype') File "/media/zoule/Elements/chexpert-labeler/chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 171, in convert_dg index = text.find(node_form, start) TypeError: must be str, not java.lang.String ERROR:root:Cannot process sentence 0 in 1 Traceback (most recent call last): File "/media/zoule/Elements/chexpert-labeler/chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 120, in convert_doc has_lemmas=self._backend == 'jpype') File "/media/zoule/Elements/chexpert-labeler/chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 171, in convert_dg index = text.find(node_form, start) TypeError: must be str, not java.lang.String ERROR:root:Cannot process sentence 52 in 1 Traceback (most recent call last): File "/media/zoule/Elements/chexpert-labeler/chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 120, in convert_doc has_lemmas=self._backend == 'jpype') File "/media/zoule/Elements/chexpert-labeler/chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 171, in convert_dg index = text.find(node_form, start) TypeError: must be str, not java.lang.String ERROR:root:Cannot process sentence 84 in 1 Traceback (most recent call last): File "/media/zoule/Elements/chexpert-labeler/chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 120, in convert_doc has_lemmas=self._backend == 'jpype') File "/media/zoule/Elements/chexpert-labeler/chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 171, in convert_dg index = text.find(node_form, start) TypeError: must be str, not java.lang.String ERROR:root:Cannot process sentence 0 in 2 Traceback (most recent call last): File "/media/zoule/Elements/chexpert-labeler/chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 120, in convert_doc has_lemmas=self._backend == 'jpype') File "/media/zoule/Elements/chexpert-labeler/chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 171, in convert_dg index = text.find(node_form, start) TypeError: must be str, not java.lang.String ERROR:root:Cannot process sentence 0 in 3 Traceback (most recent call last): File "/media/zoule/Elements/chexpert-labeler/chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 120, in convert_doc has_lemmas=self._backend == 'jpype') File "/media/zoule/Elements/chexpert-labeler/chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 171, in convert_dg index = text.find(node_form, start) TypeError: must be str, not java.lang.String ERROR:root:Cannot process sentence 29 in 3 Traceback (most recent call last): File "/media/zoule/Elements/chexpert-labeler/chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 120, in convert_doc has_lemmas=self._backend == 'jpype') File "/media/zoule/Elements/chexpert-labeler/chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 171, in convert_dg index = text.find(node_form, start) TypeError: must be str, not java.lang.String
Have you fixed the problem? If yes, can you tell me how to fix it? Thank you~
Have you fixed the problem?
Did anyone fix this problem?
Thanks for open sourcing your labeler! I'm running into the following error with the sample reports:
One of the problems here is that 'TypeError: must be str'. However, when I print the type of sample_report, it is indeed str type.
How can I fix it? Is it an issue of incompatibility with the Conda environment?