Troubleshooting - JohanDevl/Export_Trakt_4_Letterboxd GitHub Wiki

Troubleshooting

This guide helps you solve common problems you might encounter when using Export Trakt 4 Letterboxd.

Trakt Authentication Issues

Error: "Invalid API key"

Problem: The provided Client ID (API key) is not valid.

Solution:

  1. Verify that you correctly copied your Client ID from https://trakt.tv/oauth/applications
  2. Run ./setup_trakt.sh again to reconfigure authentication

Error: "Invalid OAuth code"

Problem: The provided authorization code is not valid or has expired.

Solution:

  1. Make sure to copy the code exactly as it appears in the URL
  2. Authorization codes expire quickly, so act fast after obtaining the code
  3. Run ./setup_trakt.sh again to get a new code

Error: "Unauthorized" or "401 Unauthorized"

Problem: The access token has expired or is no longer valid.

Solution:

  1. Run ./setup_trakt.sh again to get a new access token
  2. Verify that your Trakt application has the necessary permissions

Docker Issues

Container Stops Immediately

Problem: The Docker container starts and then stops immediately.

Solution:

  1. Check the container logs: docker logs trakt-export
  2. Make sure the volumes are properly mounted
  3. Check the permissions of the mounted directories

Error: "config file not found"

Problem: The configuration file is not found in the container.

Solution:

  1. Verify that the ./config:/app/config volume is properly mounted
  2. Run docker exec -it trakt-export ls -la /app/config to check the contents
  3. If the file doesn't exist, run docker exec -it trakt-export ./setup_trakt.sh to create it

Cron Jobs Not Running

Problem: Automated exports configured with cron are not running.

Solution:

  1. Verify that the CRON_SCHEDULE variable is properly set
  2. Check the container logs: docker logs trakt-export | grep cron
  3. Check the cron log file: docker exec -it trakt-export cat /app/logs/cron_export.log
  4. Restart the container: docker restart trakt-export

Export Issues

No Data Exported

Problem: The script runs but no data is exported.

Solution:

  1. Verify that your Trakt profile is public
  2. Make sure you have rated or watched movies on Trakt
  3. Check the logs for errors: cat ./logs/[DATE]-Export_Trakt.txt
  4. Run again with the initial option: ./Export_Trakt_4_Letterboxd.sh initial

Error: "jq: command not found"

Problem: The jq tool is not installed on your system.

Solution:

  1. Install jq:
    • On Ubuntu/Debian: sudo apt-get install jq
    • On macOS with Homebrew: brew install jq
    • On Windows with Chocolatey: choco install jq
  2. Or use Docker which already includes jq

Error: "curl: command not found"

Problem: The curl tool is not installed on your system.

Solution:

  1. Install curl:
    • On Ubuntu/Debian: sudo apt-get install curl
    • On macOS with Homebrew: brew install curl
    • On Windows with Chocolatey: choco install curl
  2. Or use Docker which already includes curl

Letterboxd Import Issues

Error When Importing to Letterboxd

Problem: Letterboxd reports an error when importing the CSV file.

Solution:

  1. Verify that the CSV file was properly generated: cat ./copy/letterboxd_import.csv
  2. Make sure the file contains data and is in the expected format
  3. Run the export again with the complete option: ./Export_Trakt_4_Letterboxd.sh complete
  4. If the problem persists, check the Letterboxd import requirements

Other Issues

If you encounter other issues not listed here, you can:

  1. Check the detailed logs in the ./logs/ directory
  2. Open an issue on GitHub
  3. Check the GitHub discussions to see if other users have encountered the same problem