Skip to content

Comments

fix DWCAReader for occurrence samples without image extensions#76

Open
stf976 wants to merge 2 commits intoplantnet:masterfrom
spotteron:master
Open

fix DWCAReader for occurrence samples without image extensions#76
stf976 wants to merge 2 commits intoplantnet:masterfrom
spotteron:master

Conversation

@stf976
Copy link

@stf976 stf976 commented Apr 22, 2024

If a row in DWCA occurrence data has no image extensions, and only one occurrence should be picked (the default), the respective code path will throw an exception, caused by random.choice() operating on an empty list.

To fix, simply skip occurrence samples with no image extensions.

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.

1 participant