Search code examples
app-storeitunes

EPFImporter invalid literal


I'm trying to import the application full feed from EPF. I only downloaded the application.tbz from the link provided by apple. This is the command I use to import the application file:

./EPFImporter.py -f /mnt/c/Users/vic4ever/Downloads/application/itunes20170913

This is what I get when I ran the above command

2017-09-24 00:58:51,867 [INFO]: Beginning import for the following directories:
    /mnt/c/Users/vic4ever/Downloads/application/itunes20170913
2017-09-24 00:58:51,867 [INFO]: Importing files in /mnt/c/Users/vic4ever/Downloads/application/itunes20170913
2017-09-24 00:58:51,869 [INFO]: Starting import of /mnt/c/Users/vic4ever/Downloads/application/itunes20170913...
2017-09-24 00:58:51,870 [ERROR]: Unable to create EPFIngester for application
2017-09-24 00:58:51,870 [ERROR]: invalid literal for int() with base 10: '2074265\x02'
Traceback (most recent call last):
  File "./EPFImporter.py", line 211, in doImport
    fieldDelim=fieldDelim)
  File "/mnt/d/Study/Semester2/icongenerator/EPF_Importer/EPFIngester.py", line 86, in __init__
    self.parser = EPFParser.Parser(filePath, recordDelim=recordDelim, fieldDelim=fieldDelim)
  File "/mnt/d/Study/Semester2/icongenerator/EPF_Importer/EPFParser.py", line 97, in __init__
    self.recordsExpected = int(numStr)
ValueError: invalid literal for int() with base 10: '2074265\x02'
2017-09-24 00:58:51,876 [INFO]: Import of itunes20170913 completed at: 17-09-24 00:58:51
2017-09-24 00:58:51,876 [INFO]: Total import time for itunes20170913: 0:00:00.00
2017-09-24 00:58:51,876 [WARNING]: The following files encountered errors and were not imported:
 application
2017-09-24 00:58:51,876 [WARNING]: The following files encountered errors and were not imported:
        itunes20170913/['application']
2017-09-24 00:58:51,876 [INFO]: Total import time for all directories: 0:00:00.00

I don't know where the literal '2074265\x02' comes from. Is it from the application file? Do I need to specify the record and field delimiters? Or is it the case that the default values are sufficient?


Solution

  • I don't know why but removing -f solves the problem. The correct command should be:

    ./EPFImporter.py /mnt/c/Users/vic4ever/Downloads/application/itunes20170913