Skip to content
This repository was archived by the owner on Dec 12, 2022. It is now read-only.
This repository was archived by the owner on Dec 12, 2022. It is now read-only.

[BUG] load_packet_map: path must be None or list of paths to look for modules in #12

@ShayanBahrainy

Description

@ShayanBahrainy

Describe Bug

When using load_packet_map get ValueError: path must be None or list of paths to look for modules in

To Reproduce

Run
load_packet_map(757)

Expected Behavior

Return Packet Map

Screenshots / Proof

If applicable, add screenshots to help explain your problem.

Additional Context

Full Log:
Traceback (most recent call last): File "c:\Users\sbahr\OneDrive\Documents\CustomMCClient\python\main.py", line 8, in <module> connection = SocketProtocolClient("localhost",25565,"TCP",load_packet_map("757")) File "c:\Users\sbahr\OneDrive\Documents\CustomMCClient\python\pymine_net\packets\packet_map.py", line 76, in load_packet_map packet_classes = [ File "c:\Users\sbahr\OneDrive\Documents\CustomMCClient\python\pymine_net\packets\packet_map.py", line 76, in <listcomp> packet_classes = [ File "c:\Users\sbahr\OneDrive\Documents\CustomMCClient\python\pymine_net\packets\packet_map.py", line 37, in walk_packet_classes for module in pkgutil.walk_packages(path, prefix, onerror=on_error): File "C:\Users\sbahr\AppData\Local\Programs\Python\Python310\lib\pkgutil.py", line 87, in walk_packages for info in iter_modules(path, prefix): File "C:\Users\sbahr\AppData\Local\Programs\Python\Python310\lib\pkgutil.py", line 123, in iter_modules raise ValueError("path must be None or list of paths to look for " ValueError: path must be None or list of paths to look for modules in
Full Code:
import pymine_net from pymine_net.net.socket.client import SocketProtocolClient from pymine_net.packets.packet_map import load_packet_map pymine_net from pymine_net.types.packet_map import PacketMap from pymine_net.packets.v_1_18_1.login.login import * import asyncio connection = SocketProtocolClient("localhost",25565,"TCP",load_packet_map("757")) async def login(connection: SocketProtocolClient): connection.connect() r = connection.write_packet(LoginStart("Shyaan")) r = connection.read_packet() return r loop = asyncio.get_event_loop() loop.run_until_complete(login(connection)) loop.close()
Python Version 3.10.X

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions