Skip to content

[BUG] - Error when starting.  #94

Description

@beks0nn

Describe the bug
when running poetry install i get and error saying :

Installing the current project: PyTibia (0.1.0)
Warning: The current project could not be installed: No file/folder found for package pytibia
If you do not want to install the current project use --no-root.
If you want to use Poetry only for dependency management but not for packaging, you can disable package mode by setting package-mode = false in your pyproject.toml file.
In a future version of Poetry this warning will become an error!

and whe ntrying to run the bot with poetry run python main.py there is an error after a few seconds.
$ poetry run python main.py

Traceback (most recent call last):
  File "C:\git\PyTibia\main.py", line 2, in <module>
    from src.gameplay.threads.pyTibia import PyTibiaThread
  File "C:\git\PyTibia\src\gameplay\threads\pyTibia.py", line 4, in <module>
    from src.gameplay.cavebot import resolveCavebotTasks, shouldAskForCavebotTasks
  File "C:\git\PyTibia\src\gameplay\cavebot.py", line 2, in <module>
    from src.repositories.gameWindow.creatures import hasTargetToCreature
  File "C:\git\PyTibia\src\repositories\gameWindow\creatures.py", line 8, in <module>
    from src.repositories.radar.config import walkableFloorsSqms
  File "C:\git\PyTibia\src\repositories\radar\config.py", line 86, in <module>
    floorsPathsSqms = np.load(f'{currentPath}/npys/floorsPathsSqms.npy')
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\pypoetry\Cache\virtualenvs\pytibia-YUUO83Xo-py3.11\Lib\site-packages\numpy\lib\npyio.py", line 427, in load
    fid = stack.enter_context(open(os_fspath(file), "rb"))
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\git\\PyTibia\\src\\repositories\\radar/npys/floorsPathsSqms.npy'

after trying to debug abit it looks like the problem that buildFloorsPaths.py is never ran so radar/npys/floorsPathsSqms.npy is never created.

To Reproduce
Steps to reproduce the behavior:
clean project
poetry install
poetry run python main.py

Expected behavior
expect radar/npys/floorsPathsSqms.npy to exist

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions