| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Signed-off-by: Johannes Messner <messnerjo@gmail.com>
Signed-off-by: Johannes Messner <messnerjo@gmail.com>
|
|
||
| UNUSABLE_ERROR_MSG = ( | ||
| 'This {cls} instance is in an unusable state. \n' | ||
| 'The most common cause of this is converting a DocVec to a DocList. ' |
There was a problem hiding this comment.
Right now this is the only cause, actually, but I wanted to keep our options open here.
Sorry, something went wrong.
Signed-off-by: Johannes Messner <messnerjo@gmail.com>
There was a problem hiding this comment.
Why is it unusable?
Sorry, something went wrong.
|
📝 Docs are deployed on https://ft-fix-vec-to-list-error-msg--jina-docs.netlify.app 🎉 |
Sorry, something went wrong.
Because to_doc_list() directly modifies the data stored in the columns in order to not copy the data. This "destroys" the columns. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
closes #1563
The approach is to set a flag _is_unasable as soon as the instance gets unusable, and from that point onward raise an Exception at every getatts/setattr interaction.
Unfortunately we cannot override getattr/setattr on the fly (and get rid of the _is_unasable) flag: https://stackoverflow.com/questions/10376604/overriding-special-methods-on-an-instance