Skip to content

Troubleshooting

ercdndrs edited this page Sep 26, 2021 · 4 revisions

In general, any error or warning shown in the log or in the console should be taken seriously. Errors are often descriptive so please take the time to read and attempt to understand an error before seeking external help in solving it. Some common errors are tabulated in Table 1; if you are still unsure what is wrong, please submit an issue on GitHub or reach out on our Discord.

Table 1: Frequently encountered errors when trying to run AutoMaxLair for the first time and their resolutions.

Error Resolution
A black window briefly appears and disappears when you double click auto_max_lair.py There is an error that needs to be addressed. Open auto_max_lair.py in IDLE and run it there. The error will be displayed in the Python Shell.
"No module named xyz" One or more of the additional Python modules was not installed. Revisit the Installation Guide.
"[Errno 2] No such file or directory: 'Config.toml'" Ensure the config file is saved as Config.toml and not Config.sample.toml or Config.toml.txt. If you are using an IDE such as Visual Studio Code, ensure the working directory is correct.
"serial.serialutil.SerialException: could not open port X" The COM port indicated in Config.toml is likely incorrect. For Windows users, the port name should be "COMX" where X is a number that depends on your machine. The number can be found by finding the serial device in the Device Manager.
"AssertionError: XYZ" An internal error raised by the program, usually because of an invalid input. Read the error for the specific issue.
The program starts but video from your webcam is shown. Change the VIDEO_INDEX in Config.toml.
The program starts but no button presses are registered. Repeated warnings appear in the log: "Received "X" instead of sent "Y"." If X is b'', your wires between the UART device and microcontroller may be configured incorrectly, the wrong hex file may be loaded on the microcontroller, or your serial device may not have the correct drivers installed. If X is the Y from the previous message, one of the serial buffers may have become desynchronized. Close the program, the completely unplug the UART device and microcontroller from both the Switch and your computer. Plug everything back in and try again.
The program starts but no button presses are registered. No warnings appear in the log. Check that no wireless controllers are connected to the Switch and that it is properly seated in the dock. We recommend starting in the "Change grip/order" screen to avoid this issue altogether.
The program starts and joins a Dynamax adventure, but crashes when choosing a rental Pokemon. The Tesseract path is likely incorrect in Config.toml. Ensure it points to the location where you installed Tesseract. Alternatively, if you specified a non-English language, the corresponding X.traineddata file (added during Tesseract installation) may not be downloaded or placed in the appropriate folder. If the problem persists, try running IDLE as an administrator before starting AutoMaxLair.
The program runs, but no coloured boxes appear on the screen. The boxes are not necessary for the bot to run. If you would still like to see them, set ENABLE_DEBUG_LOGS to true in Config.toml.
The program starts, but gets stuck in a certain spot (e.g., on the "Fight" menu) with the video playing but no actions being performed. If there is a black border all the way around the game video, the Switch's Screen Size needs to be changed to 100%. See Nintendo's guide for instructions on this step.
When checking the caught Pokemon for shininess, the small red rectangle partially overlaps with the grey Galar symbol. This behaviour is normal; the Galar symbol will be shifted to the right in the case of a shiny.
Clone this wiki locally