04-14-2021, 06:34 PM
@janvda @fdealexa To prevent such situations in the future I updated the stationmanager.py script to instead of abort continue with the next import station. I guess it will be part of moOde 7.2.
@fdealexa
By the way the stations backupzip which contains a .csv aren't created with the stationmanager.py script, but with older moOde stations backup script.
The new backup will always contains the .json file. This is the only way to support the rich information Tim added to the about the station to the database.
When running the import from the web interface you don't see all the output of the stationmanager.
When you run it from command line it will report the import status and errors and.
With the fixed script the error in this case will showup as an 'Error on import':
@fdealexa
By the way the stations backupzip which contains a .csv aren't created with the stationmanager.py script, but with older moOde stations backup script.
The new backup will always contains the .json file. This is the only way to support the rich information Tim added to the about the station to the database.
When running the import from the web interface you don't see all the output of the stationmanager.
When you run it from command line it will report the import status and errors and.
With the fixed script the error in this case will showup as an 'Error on import':
Code:
sudo ./stationmanager.py --import --scope all --how clear ~/stations_problem.zip
SQL database location is '/var/local/www/db/moode-sqlite3.db'
Station logos location is '/var/local/www/imagesw/radio-logos'
Station pls file location is '/var/lib/mpd/music/RADIO'
Using Station backup file '/home/pi/stations_problem.zip'.
WARNING: Station backup is an old format
import
WARNING: no schema information, guessing moOde 6.7.1 station backup format
WARNING: Source and target differ, correcting used types
Clear stations for scope 'all'
... <cut text> ...
Import Nostalgie 60/70
Error on import: [Errno 2] No such file or directory: '/var/lib/mpd/music/RADIO/Nostalgie 60/70.pls'
Import Nostalgie 80
WARNING: Missing station logo thumb for 'Nostalgie 80', generating one
... <cut text> ...
Imported 35 radio stations