thexivn / RandomMapTogether

Simple pyplanet application to add RMC mode online
GNU Affero General Public License v3.0
6 stars 4 forks source link

Problems with downloading trackmania.exchange maps when starting RMT #2

Open pietrok29 opened 1 year ago

pietrok29 commented 1 year ago

Hi, I'm new to the dedicated server/pyplanet setup. I've successfully entered my server on trackmania and can see the RMT Hub. However whenever I try to start RMT inside the server, I receive this error:

INFO     [default][it.thexivn.random_maps_together.MapHandler] Trying to load next map ...
DEBUG    [default][urllib3.connectionpool] Starting new HTTPS connection (1): trackmania.exchange:443
DEBUG    [default][urllib3.connectionpool] https://trackmania.exchange:443 "GET /mapsearch2/search?api=on&random=1&lengthop=1&length=9&etags=23%2C46%2C40%2C41%2C42%2C37 HTTP/1.1" 200 1172
INFO     [default][it.thexivn.random_maps_together.RestClient.TMNXRestClient] downloading https://trackmania.exchange/maps/download/79987
DEBUG    [default][urllib3.connectionpool] Starting new HTTPS connection (1): trackmania.exchange:443
DEBUG    [default][urllib3.connectionpool] https://trackmania.exchange:443 "GET /maps/download/79987 HTTP/1.1" 200 1038438
INFO     [default][it.thexivn.random_maps_together.RestClient.TMNXRestClient] download completed for mapID 79987
INFO     [default][it.thexivn.random_maps_together.MapHandler] uploading zr5o9oCa6i9UJ_dGzulcIpTCaAc.Map.Gbx to the server...
DEBUG    [default][pyplanet.core.gbx.remote] GBX: Received response to handler 2147483703, method: None
DEBUG    [default][pyplanet.core.gbx.remote] GBX: Received response to handler 2147483704, method: None
ERROR    [default][it.thexivn.random_maps_together.RMTGame] failed to load map...
Traceback (most recent call last):
  File "C:\Users\Jason\AppData\Local\Programs\Python\Python37\lib\site-packages\pyplanet\contrib\map\manager.py", line 381, in add_map
    result = await self._instance.gbx(gbx_method, filename)
  File "C:\Users\Jason\AppData\Local\Programs\Python\Python37\lib\site-packages\pyplanet\core\gbx\query.py", line 38, in execute
    return await self._client.execute(self.method, *self.args, timeout=self.timeout)
  File "C:\Users\Jason\AppData\Local\Programs\Python\Python37\lib\site-packages\pyplanet\core\gbx\remote.py", line 206, in execute
    return await asyncio.wait_for(future, timeout)
  File "C:\Users\Jason\AppData\Local\Programs\Python\Python37\lib\asyncio\tasks.py", line 412, in wait_for
    return fut.result()
  File "C:\Users\Jason\AppData\Local\Programs\Python\Python37\lib\site-packages\pyplanet\core\gbx\remote.py", line 220, in listen
    data, method = loads(body, use_builtin_types=True)
  File "C:\Users\Jason\AppData\Local\Programs\Python\Python37\lib\xmlrpc\client.py", line 1021, in loads
    return u.close(), u.getmethodname()
  File "C:\Users\Jason\AppData\Local\Programs\Python\Python37\lib\xmlrpc\client.py", line 656, in close
    raise Fault(**self._stack[0])
xmlrpc.client.Fault: <Fault -1000: 'Map unknown.'>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Jason\AppData\Local\Programs\Python\Python37\lib\site-packages\random_maps_together-0.0.4-py3.7.egg\it\thexivn\random_maps_together\RMTGame.py", line 97, in load_with_retry
    await self._map_handler.load_next_map()
  File "C:\Users\Jason\AppData\Local\Programs\Python\Python37\lib\site-packages\random_maps_together-0.0.4-py3.7.egg\it\thexivn\random_maps_together\MapHandler.py", line 37, in load_next_map
    f'{random_map.uuid}.Map.Gbx', overwrite=True)
  File "C:\Users\Jason\AppData\Local\Programs\Python\Python37\lib\site-packages\pyplanet\contrib\map\manager.py", line 422, in upload_map
    return await self.add_map(filename, insert=insert)
  File "C:\Users\Jason\AppData\Local\Programs\Python\Python37\lib\site-packages\pyplanet\contrib\map\manager.py", line 384, in add_map
    raise MapNotFound('Map is not found on the server.')
pyplanet.contrib.map.exceptions.MapNotFound: Map is not found on the server.

When I look at my dedicated server output, it will say: 'Map "DwNIZNhQwNWYlI_hLUV4T7b3DJ2.Map.Gbx" not found.' However, I can see them downloaded in my UserData/Maps folder.

I'm not really sure if this is something I need to edit in my dedicated_cfg.txt file, or if I need to change my matchsettings file. I'm quite confused on this subject. I apologize if this really isn't an issue regarding the source code, but I wasn't entirely sure where to ask this question and thought I'd try my chances here.

Thank you! :)

McRobbro commented 1 year ago

+1 also currently having this issue, did you find a fix?

pietrok29 commented 1 year ago

I have not figured the problem out yet. I spent a few extra days after the post trying to figure out what I might have done wrong in the setup, but couldn't find anything through the many forums I visited. I haven't tried working on the issue since. Sorry ):

thexivn commented 1 year ago

Looked into this problem, but seems to be a different behaviour of the windows server. The map is correctly saved inside UserData/Maps but it fails when try to add to the map list. I will try to find a solution for Windows, in the meanwhile i advice to start the server using Docker. Here you can find the docker-compose i use to create Scrapie server RMT-Docker

pietrok29 commented 1 year ago

Awesome, that container works great! Thank you!