munki / macadmin-scripts

Scripts of possible interest to macOS admins
Other
2.33k stars 523 forks source link

Error reading file #109

Closed danychaddad closed 1 year ago

danychaddad commented 2 years ago

Running the script on macOS High Sierra 10.13.6, trying to download Catalina on a MacBook Pro Retina 13-inch Mid-2014 It used to work, but now whenever I run the script I get those lines: dany$ sudo python /Users/Shared/installinstallmacos.py

Downloading https://swscan.apple.com/content/catalogs/others/index-10.13-10.12-10.11-10.10-10.9-mountainlion-lion- snowleopard-leopard.merged-1.sucatalog...

Error reading ./content/catalogs/others/index-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog: no element found: line 55633, column 134

grahampugh commented 2 years ago

@danychaddad there is an entry in Apple's 10.13 catalog that has no ProductID. This causes installinstallmacos.py to crash, since it expects one. I had the same problem in my own fork of this script, so I built in a catch for it to prevent the failure.

As a workaround, you can specify a different catalog when running the script. For example, this will use the Mojave catalog instead of the High Sierra catalog:

./installinstallmacos.py --catalogurl "https://swscan.apple.com/content/catalogs/others/index-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog"

Note there's no guarantee that the installers listed in the newer catalogs will work on High Sierra, so you have to test.

danychaddad commented 2 years ago

I did that, and it worked! I'm not sure if the installer will work on my version of macOS, it's still downloading, but what's weird is that it worked in the past (in the past few days). It suddenly stopped working today so that's why I opened this issue.