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

[Random Crash] Usually during unittests #472

Open
DEKHTIARJonathan opened this issue Dec 20, 2024 · 0 comments
Open

[Random Crash] Usually during unittests #472

DEKHTIARJonathan opened this issue Dec 20, 2024 · 0 comments

Comments

@DEKHTIARJonathan
Copy link

DEKHTIARJonathan commented Dec 20, 2024

I'm having a weird crash - totally random and hard to reproduce:

tests/factories.py:68: in ProjectFactory
    country = random.choice(countries)[0]
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/random.py:352: in choice
    return seq[self._randbelow(len(seq))]
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/site-packages/django_countries/__init__.py:588: in __getitem__
    return next(itertools.islice(self.__iter__(), index, index + 1))
E   StopIteration

Probably means that self.__iter__() returns an empty result for some reasons.
I believe it may happen when something doesn't get initialized. No idea what and why.

Any idea what the issue could be ?

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

No branches or pull requests

1 participant