I don't know why I'm getting this error

Why am i getting this error? (installing contour doesn’t change anything)

Traceback (most recent call last):
  File "main.py", line 6, in <module>
    from modules.elo_list import clan_console_mix_1v1_elo_list, clan_console_mix_1v1_and_2v2_elo_list, server_1v1_and_2v2_elo_list
  File "/home/runner/Ranknir-50-Revival/modules/elo_list.py", line 1, in <module>
    from modules.get_elo import get_players_elo_1v1, get_players_elo_2v2, get_players_elo_1v1_and_2v2
  File "/home/runner/Ranknir-50-Revival/modules/get_elo.py", line 1, in <module>
    from classes.Player import Player
  File "/home/runner/Ranknir-50-Revival/venv/lib/python3.8/site-packages/classes/__init__.py", line 11, in <module>
    from Contour import *
ModuleNotFoundError: No module named 'Contour'

Hi @KaanGogcay , welcome to the forums!
Can you try entering poetry add contour into the Shell and see if it works?
Hope this helps!


This didn’t change anythint. Since contour also installed modules, i renamed my own “modules” folder to “modules2” but this didn’t change anything either

Hey, @KaanGogcay !

Can you please provide a link to the repl? This way it is easier for staff and members of the community to help you!

Also see this guide on how to share your code:

1 Like

Here is the repl link btw
It is very confusing when they got classes in both site package and runner level tho.

Hello and welcome to the forums @KaanGogcay! Can you try to run pip install contour?

Thank you!

Hello, your code seems to be importing a random, unrelated package called classes which is probably unintended.
To fix the issue, add an __init__.py file to your classes folder, you should also add one to your modules2 folder. These files can be empty, but they are important since they help python find your packages (folders) more easily.


This solved it ty <3

Hi @KaanGogcay !
Since @NuclearPasta0 's answer helped you, could you mark that post as a Solution?

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.