Skip to content
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

Fixes a crash you can run into with postgres array columns. #7

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

justJay-dev
Copy link

Encountered a bug when using a pg array column, causes a crash, it'd due to this function in spacy.

https://github.com/explosion/spaCy/blob/02259fa1954d7912f30e34495b27b304ec93d7ce/spacy/language.py#L1084

The change here just tries to cast the datum str to a list, and if it can, treat each item within the datum list as its own datum.

Thanks!

@vrajat
Copy link
Member

vrajat commented May 31, 2023

Thank you for the contribution. Do you have a test case for this case? We will create a test suite and add it in another PR. Also the PR contains whitespace and quote edits. Can you please revert those changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants