-
Notifications
You must be signed in to change notification settings - Fork 4
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
MongoDB: Error while using translate ValueError: max() iterable argument is empty
#134
Comments
Dear @delusion8399, in order to approach that problem, maybe you can share your collection schema with us, and a few samples worth of data? We would love to add corresponding improvements to make the program more robust. With kind regards, |
Silly ReproductionI have been able to reproduce the problem on a narrow scope:
>>> types = {}
>>> max(types, key=lambda item: types[item]["count"])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: max() arg is an empty sequence ThoughtsI guess your collection may use a MongoDB data type the program does not know about, trips on it, and fails to convey that flaw in a good way. If you could tell us about all data types used within the collection at hand, it could already give us more hints to investigate more closely. Thanks! |
Dear @delusion8399, that patch improved quite a few edge case situations in the MongoDB table loader. Maybe you would like to give it another try after upgrading to the most recent version of cratedb-toolkit? With kind regards, |
I've just been able to spot this shape of schema information on real-world data, which seems to trip that very error. So, I may assume a fix is neigh.
Most probably, it is about empty arrays/lists, where naturally an inner type can't be derived from. |
ValueError: max() iterable argument is empty
Thank you so much for taking this so seriously. Anyways If In future I got such case I would definitely use and contribute to this tool. |
@delusion8399 added a report at crate/mongodb-cratedb-migration-tool#25. Because we are archiving that repository, we are adding the report here instead.
Hi, getting this error while using translate
The text was updated successfully, but these errors were encountered: