timsutton / aamporter

Utility to batch download Adobe Creative Suite/Cloud updates and optionally import them into a Munki repository.
MIT License
86 stars 14 forks source link

Error running on 10.9.3 server #8

Closed notverypc closed 10 years ago

notverypc commented 10 years ago

Hi It is very possible that I've done something wrong but when I run ./aamporter.py --product-plist my.plist

I get the following error:

Traceback (most recent call last):
  File "./aamporter.py", line 702, in <module>
    main()
  File "./aamporter.py", line 482, in main
    local_cache_path = pref('local_cache_path')
  File "./aamporter.py", line 85, in pref
    p = plistlib.readPlist(settings_plist)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py", line 78, in readPlist
    rootObject = p.parse(pathOrFile)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plistlib.py", line 406, in parse
    parser.ParseFile(fileobj)
xml.parsers.expat.ExpatError: no element found: line 10, column 7

Any help would be gratefully received.

timsutton commented 10 years ago

Looks like your plist may not be valid. What's the output of plutil -lint on your plist? We should still handle this error properly though.

notverypc commented 10 years ago

It comes back as OK

CC_Full_May19v2.plist: OK
timsutton commented 10 years ago

Could you please post or gist it?

notverypc commented 10 years ago

I've gist the plist:

https://gist.github.com/notverypc/b3753fd56fec2548d69c

I tried running one of the example plists and got the same error.

timsutton commented 10 years ago

I didn't read the error closely enough. The call starting from here:

  File "./aamporter.py", line 85, in pref
    p = plistlib.readPlist(settings_plist)

suggests it's your settings plist that's causing the issue. Could you lint and/or post that?

notverypc commented 10 years ago

D'oh.. Thought it might be something I did! Forgot the </plist> at the end of the pref file!!

Thanks for the help!

timsutton commented 10 years ago

Handling this properly now as of b5b0d950252645486c038f055631383c422a97c7.