我尝试使用此链接http://www.apple.com/itunes/affiliates/resources/documentation/epfimporter.html
-----------------------
*下面是我执行的脚本.. *

C:\Documents and Settings\freakk>python D:\freakk\Downloads\EPF_Itunes\EPFImporter\E
PFimporter.py \D:\freakk\Downloads\EPF_Itunes\EPFImporter\db\album_popularity_per_
genre

-----------------------
*但是我收到这些错误*
2011-10-12 18:24:00,529 [INFO]: Beginning import for the following directories:
    \D:\freakk\Downloads\EPF_Itunes\EPFImporter\db\album_popularity_per_genre
2011-10-12 18:24:00,529 [INFO]: Importing files in \D:\freakk\Downloads\EPF_Itunes
\EPFImporter\db\album_popularity_per_genre
Traceback (most recent call last):
  File "D:\freakk\Downloads\EPF_Itunes\EPFImporter\EPFimporter.py", line 452, in <
module>
    main()
  File "D:\freakk\Downloads\EPF_Itunes\EPFImporter\EPFimporter.py", line 435, in m
ain
    fieldDelim=fieldSep)
  File "D:\freakk\Downloads\EPF_Itunes\EPFImporter\EPFimporter.py", line 162, in d
oImport
    fileList = os.listdir(dirPath)
WindowsError: [Error 123] The filename, directory name, or volume label syntax i
s incorrect: 'C:\\D:\\freakk\\Downloads\\EPF_Itunes\\EPFImporter\\db\\album_popula
rity_per_genre/*.*'

请帮我....

最佳答案

看到错误日志,提示您语法错误

C:\\D:\\freakk\\Downloads\\EPF_Itunes\\EPFImporter\\db\\album_popularity_per_genre/*.*

告诉我D目录如何在C中?它没有获得到达那里的正确路径。
EPFImporter的这段代码基本上是针对Mac OS的,它假定您与EPFImporter.py位于同一目录,而在Mac OS中,所有内容都位于同一目录(根据mac的设计)。
C:\Documents and Settings\freakk>python D:\freakk\Downloads\EPF_Itunes\EPFImporter\EPFimporter.py \D:\freakk\Downloads\EPF_Itunes\EPFImporter\db\album_popularity_per_genre

上面的命令将找不到您的EPFImporter.py或album_popularity_per_genre。
将目录从C更改为D,然后转到EPFImporter.py的目录,然后尝试按
.....EPFImporter>python EPFImporter.py db\album_popularity_per_genre

假设您位于EPFImporter的同一文件夹中,未经测试,但类似的事情可能对您有用。希望这个答案使您对此有所了解。

08-25 00:36