SchoolProject12345 / OCardGame

The chaotic card game project we do in OC Informatique.
Other
0 stars 0 forks source link

Error when launching main.py #106

Closed OrnitOnGithub closed 8 months ago

OrnitOnGithub commented 8 months ago
# python3 ChaosCardGame/main.py
pygame 2.5.1 (SDL 2.28.2, Python 3.10.7)
Hello from the pygame community. https://www.pygame.org/contribute.html
[INFO] Successfully loaded backgrounds
[INFO] Successfully loaded buttons
[INFO] Successfully loaded card menu toggles
[INFO] Successfully loaded textboxes
[INFO] Successfully loaded cards
Traceback (most recent call last):
  File "/Users/etudiant/Desktop/programming/OCardGame/ChaosCardGame/main.py", line 8, in <module>
    from UserInterface.ocg_app import OcgGame
  File "/Users/etudiant/Desktop/programming/OCardGame/ChaosCardGame/UserInterface/ocg_app.py", line 9, in <module>
    from UserInterface.MenuStates.play_menu_ui import PlayMenu
  File "/Users/etudiant/Desktop/programming/OCardGame/ChaosCardGame/UserInterface/MenuStates/play_menu_ui.py", line 5, in <module>
    from UserInterface.MenuStates.join_menu_ui import JoinMenu
  File "/Users/etudiant/Desktop/programming/OCardGame/ChaosCardGame/UserInterface/MenuStates/join_menu_ui.py", line 4, in <module>
    from Network.server import HandlerHandler as handle, join as join_server
  File "/Users/etudiant/Desktop/programming/OCardGame/ChaosCardGame/Network/server.py", line 122, in <module>
    get_ip() # initialize HandlerHandler's ip
  File "/Users/etudiant/Desktop/programming/OCardGame/ChaosCardGame/Network/server.py", line 107, in get_ip
    ips: list = net.socket.getaddrinfo(net.socket.gethostname(), None) # might not be 100% system independant
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/socket.py", line 955, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 8] nodename nor servname provided, or not known
OrnitOnGithub commented 8 months ago

Turns out this is only happening to me so I'll try to figure it out

OrnitOnGithub commented 8 months ago

I turned wifi off and back on and it fixed it