-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.update call generates the error:: TypeError: object of type 'NoneType' has no len() #5181
Comments
Thanks for the report! Could you provide a little more context to help us debug this? If at all possible, a minimal working code snippet (+ 1 or 2 lines of sample data) that shows the error would be very useful for us to try and replicate this. We haven't seen this problem while training an NER on 2.2.4 before, but the fact that the same code does run on 2.1 certainly seems to indicate a problem with the new version. |
This issue has been automatically closed because there has been no response to a request for more information from the original author. With only the information that is currently in the issue, there's not enough information to take action. If you're the original author, feel free to reopen the issue if you have or find the answers needed to investigate further. |
@svlandeg was there are an update on this? I am running into the same issue. |
This issue was closed because it's virtually impossible for us to debug without a runnable code snippet + sample data that exhibits the error, but my request for this was never answered. |
I have the exact same problem. I can confirm every once in a while the code runs as expected so that is confusing. Here is the block of code the error is coming from. My error message is identical to the original one.
My data set is text file with each line as such: label1 [text...] I am separating this corresponding lists of categories and texts. The texts are just the plain text and the categories are structured as follows: category structure: {"cats": {"SUBJECTIVE": 1}} |
can confirm there is a stray space as a text input somewhere in my set. This was never a problem with the older version but is in the version. That is an error on my end but still an odd result in terms of error only showing up on 2.2 |
Thanks for the additional informatin @j-cahill10 ! So this gets triggered by an "empty" text (or just a whitespace) in your training data? If you remove it in preprocessing, you don't get the error anymore? |
It is triggered by an empty string. In my case it was just: "" I had originally tried filtering for NonType elements and did not pick anything up so if you are having this issue double check the text being fed into your program. |
I could identify and resolve the original bug, which indeed got triggered when training an NER component with an empty text. However @j-cahill10, I think your issue is probably related, but not exactly the same, as it involves training the |
@AbhayGodbole: your original bug should be addressed by PR #5425 |
Still getting this on 2.2.4 with Python 3.7.7 and Mac 10.15.4, running the code found here https://github.com/explosion/spaCy/blob/master/examples/training/train_ner.py I'm running a slight modification of that script, where data is being pulled in from Prodigy and converted to Spacy's training format. But...some of the runs of the script go smoothly and some break with the exact same arguments.
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hi
I am creating a Custom Model. I am facing couple of issues....
(The current setup I have to do on the VDI provided by client to work from home. My previous environment was on my desktop in office where everything working fine. both model was getting created without error and the Model results where also good)
Environment
Info about spaCy
The text was updated successfully, but these errors were encountered: