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

[BUG] - Error when starting. #94

Open
beks0nn opened this issue Sep 5, 2024 · 1 comment
Open

[BUG] - Error when starting. #94

beks0nn opened this issue Sep 5, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@beks0nn
Copy link

beks0nn commented Sep 5, 2024

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
@beks0nn beks0nn added the bug Something isn't working label Sep 5, 2024
@beks0nn
Copy link
Author

beks0nn commented Sep 5, 2024

get same error when running unittests
==================================================================================================== short test summary info ====================================================================================================
ERROR tests/unit/gameplay/core/tasks/test_attackClosestCreature.py - FileNotFoundError: [Errno 2] No such file or directory: 'C:\git\PyTibia\src\repositories\radar/npys/floorsPathsSqms.npy'
ERROR tests/unit/gameplay/core/tasks/test_depositGold.py - FileNotFoundError: [Errno 2] No such file or directory: 'C:\git\PyTibia\src\repositories\radar/npys/floorsPathsSqms.npy'
ERROR tests/unit/gameplay/core/tasks/test_depositItems.py - FileNotFoundError: [Errno 2] No such file or directory: 'C:\git\PyTibia\src\repositories\radar/npys/floorsPathsSqms.npy'
ERROR tests/unit/gameplay/core/tasks/test_dropFlasks.py - FileNotFoundError: [Errno 2] No such file or directory: 'C:\git\PyTibia\src\repositories\radar/npys/floorsPathsSqms.npy'
ERROR tests/unit/gameplay/core/tasks/test_useRopeWaypoint.py - FileNotFoundError: [Errno 2] No such file or directory: 'C:\git\PyTibia\src\repositories\radar/npys/floorsPathsSqms.npy'
ERROR tests/unit/gameplay/core/tasks/test_useShovelWaypoint.py - FileNotFoundError: [Errno 2] No such file or directory: 'C:\git\PyTibia\src\repositories\radar/npys/floorsPathsSqms.npy'
ERROR tests/unit/gameplay/core/tasks/test_walkToCoordinate.py - FileNotFoundError: [Errno 2] No such file or directory: 'C:\git\PyTibia\src\repositories\radar/npys/floorsPathsSqms.npy'
ERROR tests/unit/gameplay/core/tasks/test_walkToWaypoint.py - FileNotFoundError: [Errno 2] No such file or directory: 'C:\git\PyTibia\src\repositories\radar/npys/floorsPathsSqms.npy'
ERROR tests/unit/repositories/radar/core/test_getBreakpointTileMovementSpeed.py - FileNotFoundError: [Errno 2] No such file or directory: 'C:\git\PyTibia\src\repositories\radar/npys/floorsPathsSqms.npy'
ERROR tests/unit/repositories/radar/core/test_getClosestWaypointIndexFromCoordinate.py - FileNotFoundError: [Errno 2] No such file or directory: 'C:\git\PyTibia\src\repositories\radar/npys/floorsPathsSqms.npy'
ERROR tests/unit/repositories/radar/core/test_isCloseToCoordinate.py - FileNotFoundError: [Errno 2] No such file or directory: 'C:\git\PyTibia\src\repositories\radar/npys/floorsPathsSqms.npy'
ERROR tests/unit/repositories/radar/core/test_isCoordinateWalkable.py - FileNotFoundError: [Errno 2] No such file or directory: 'C:\git\PyTibia\src\repositories\radar/npys/floorsPathsSqms.npy'
ERROR tests/unit/repositories/radar/core/test_isNonWalkablePixelColor.py - FileNotFoundError: [Errno 2] No such file or directory: 'C:\git\PyTibia\src\repositories\radar/npys/floorsPathsSqms.npy'
ERROR tests/unit/repositories/radar/extractors/getRadarImg/test_getRadarImg.py - FileNotFoundError: [Errno 2] No such file or directory: 'C:\git\PyTibia\src\repositories\radar/npys/floorsPathsSqms.npy'
ERROR tests/unit/repositories/radar/locators/getRadarToolsPos/test_getRadarToolsPos.py - FileNotFoundError: [Errno 2] No such file or directory: 'C:\git\PyTibia\src\repositories\radar/npys/floorsPathsSqms.npy'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 15 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant