refactor: replace AssertionError with more meaningful exceptions (#5074)
{'login': 'galbwe', 'id': 20004072, 'node_id': 'MDQ6VXNlcjIwMDA0MDcy', 'avatar_url': 'https://avatars.githubusercontent.com/u/20004072?v=4', 'gravatar_id': '', 'url': 'https://api.github.com/users/galbwe', 'html_url': 'https://github.com/galbwe', 'followers_url': 'https://api.github.com/users/galbwe/followers', 'following_url': 'https://api.github.com/users/galbwe/following{/other_user}', 'gists_url': 'https://api.github.com/users/galbwe/gists{/gist_id}', 'starred_url': 'https://api.github.com/users/galbwe/starred{/owner}{/repo}', 'subscriptions_url': 'https://api.github.com/users/galbwe/subscriptions', 'organizations_url': 'https://api.github.com/users/galbwe/orgs', 'repos_url': 'https://api.github.com/users/galbwe/repos', 'events_url': 'https://api.github.com/users/galbwe/events{/privacy}', 'received_events_url': 'https://api.github.com/users/galbwe/received_events', 'type': 'User', 'site_admin': False}
[]
[]
_The documentation is not available anymore as the PR was closed or merged._
Closes #5074

Replaces `AssertionError` in the following files with more descriptive exceptions:

- `src/datasets/arrow_reader.py`
- `src/datasets/builder.py`
- `src/datasets/utils/version.py`

The issue listed more files that needed to be fixed, but the rest of them were contained in the top-level `datasets` directory, which was removed when #4974 was merged
{'url': 'https://api.github.com/repos/huggingface/datasets/issues/5079/reactions', 'total_count': 0, '+1': 0, '-1': 0, 'laugh': 0, 'hooray': 0, 'confused': 0, 'heart': 0, 'rocket': 0, 'eyes': 0}
{'url': 'https://api.github.com/repos/huggingface/datasets/pulls/5079', 'html_url': 'https://github.com/huggingface/datasets/pull/5079', 'diff_url': 'https://github.com/huggingface/datasets/pull/5079.diff', 'patch_url': 'https://github.com/huggingface/datasets/pull/5079.patch', 'merged_at': '2022-10-07T14:33:10Z'}