PyPlanet bug local record

Python 3 Server Controller for Trackmania and Shootmania for script-only modes.

Moderators: TheM, toffe, NADEO

Post Reply
User avatar
benj9029
Posts: 6
Joined: 17 Jul 2018, 10:31

PyPlanet bug local record

Post by benj9029 » 20 Nov 2018, 03:47

Hi
I got a problem with PyPlanet, when I use the Local Record app the console just crash and same with mania karma but don't really care of this one,
The error :
INFO [Main][pyplanet.core.management.commands.start] Initiated configuration and environment...
INFO [Main][pyplanet.core.management.commands.start] -------------------------------[ PyPlanet v0.6.3 ]-------------------------------
INFO [MainThread][pyplanet.god.process] Starting pool process for 'default'...
INFO [default][root] Database connection established!
WARNING [default][pyplanet.core.db.migrator] Can't migrate pyplanet.apps.contrib.local_records.migrations.000_make_player_map_unique: (1061, "Nom de clef 'localrecord_player_id_map_id' déjà utilisé")
ERROR [default][pyplanet.core.instance] (1061, "Nom de clef 'localrecord_player_id_map_id' déjà utilisé")

"déja utilisé" mean already used
Does anyone get an idea?
Thanks

User avatar
toffe
Posts: 671
Joined: 15 Jun 2013, 10:57
Location: The Netherlands
Contact:

Re: PyPlanet bug local record

Post by toffe » 20 Nov 2018, 12:19

Hi,

You have duplicates in the maps table that needs to be removed first. You can do so with the following database query (execute it with MySQL CLI or PHPMyAdmin on the right database).

Code: Select all

DELETE l1 FROM localrecord l1
        INNER JOIN
    localrecord l2 
WHERE
    l1.id < l2.id AND l1.map_id = l2.map_id;
After executing this query, try to restart PyPlanet and the migration will succeed.

User avatar
benj9029
Posts: 6
Joined: 17 Jul 2018, 10:31

Re: PyPlanet bug local record

Post by benj9029 » 21 Nov 2018, 00:08

Where do I need to type that because I entered this in the database and that doesn't work, do I need to execute it in a special place ?

User avatar
benj9029
Posts: 6
Joined: 17 Jul 2018, 10:31

Re: PyPlanet bug local record

Post by benj9029 » 21 Nov 2018, 00:18

Nvm, I deleted all the index of local record and that just worked :)

Post Reply

Return to “PyPlanet”

Who is online

Users browsing this forum: No registered users and 1 guest