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

Recalc Route for a quest area (on async) needs an update to look at all stops #1289

Open
wraythex opened this issue Dec 22, 2022 · 1 comment · May be fixed by #1343
Open

Recalc Route for a quest area (on async) needs an update to look at all stops #1289

wraythex opened this issue Dec 22, 2022 · 1 comment · May be fixed by #1343

Comments

@wraythex
Copy link
Contributor

When clicking the "recalc route" button for a quest area, I get a pop-up error saying that it is "unable to start route calc, please check server logs". When I look at the logs I see the following error:

mapadroid.utils.madGlobals.RoutemanagerShuttingDown: No coords to calculate a route

I've been informed that clicking the recalc button for a quest area in async will only pull a list of stops with no known quest, instead of the full list of stops in that area. Could someone update async so that clicking the "recalc route" button for a quest area on the Settings->Areas page will pull the full list of stops for that area? Thanks!

Here is the full error backtrace:

[12-21 22:00:33.93] [  madmin-endpoint] [    <ip>] [ RouteManagerQuests:112 ] [I] Starting routemanager
[12-21 22:00:33.96] [  madmin-endpoint] [    <ip>] [ RouteManagerQuests:126 ] [I] Shutdown Route
[12-21 22:00:33.96] [     routemanager] [    <ip>] [   RouteManagerBase:134 ] [I] Shutdown Route Threads
[12-21 22:00:33.96] [     routemanager] [    <ip>] [   RouteManagerBase:142 ] [I] Shutdown Route Threads completed
[12-21 22:00:33.96] [     routemanager] [    <ip>] [   RouteManagerBase:153 ] [I] Shutdown of route completed
[12-21 22:00:33.96] [            utils] [    <ip>] [     MappingManager:502 ] [E] Unable to start recalculation
Traceback (most recent call last):
  File "/home/asyncmad/start.py", line 259, in <module>
    asyncio.run(start(), debug=True)
  File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/home/py39amad/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/home/py39amad/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/home/py39amad/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/home/asyncmad/mapadroid/utils/aiohttp/XPathForwardedFor.py", line 47, in middleware
    return await handler(request)
  File "/home/asyncmad/mapadroid/madmin/AbstractMadminRootEndpoint.py", line 59, in _iter
    response = await self.__generate_response(session)
  File "/home/asyncmad/mapadroid/madmin/AbstractMadminRootEndpoint.py", line 65, in __generate_response
    response = await super()._iter()
  File "/home/py39amad/lib/python3.9/site-packages/aiohttp/web_urldispatcher.py", line 954, in _iter
    resp = await method()
  File "/home/asyncmad/mapadroid/madmin/endpoints/api/resources/AreaEndpoint.py", line 104, in post
    return await self._recalc_area(identifier)
  File "/home/asyncmad/mapadroid/madmin/endpoints/api/resources/AreaEndpoint.py", line 128, in _recalc_area
    status = await self._get_mapping_manager().routemanager_recalculate(area.area_id)
> File "/home/asyncmad/mapadroid/mapping_manager/MappingManager.py", line 494, in routemanager_recalculate
    await routemanager.start_routemanager()
  File "/home/asyncmad/mapadroid/route/RouteManagerQuests.py", line 115, in start_routemanager
    await self.calculate_route(dynamic=True, overwrite_persisted_route=False)
  File "/home/asyncmad/mapadroid/route/RouteManagerBase.py", line 209, in calculate_route
    raise RoutemanagerShuttingDown("No coords to calculate a route")
mapadroid.utils.madGlobals.RoutemanagerShuttingDown: No coords to calculate a route
@Axiangel
Copy link

I suggest you make a new init of the area. I cannot recreate your error on my server.
As the log suggests, it cannot find any coords.
Master will make an init by default, but async requires a specific init mode.

MonsterMap added a commit to MonsterMap/MAD that referenced this issue Apr 26, 2023
MonsterMap added a commit to MonsterMap/MAD that referenced this issue Apr 26, 2023
Allows us to skip calculating the initial route when starting,
so that calculation can be started separately (fixes Map-A-Droid#1289)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants