jssimporter/JSSImporter

'NSTaggedPointerString' object has no attribute 'get'

Closed this issue · 3 comments

  • OS X 10.13.1

  • AutoPkg 1.0.3

  • JSSImporter v1.0.0-beta2

JSSImporterZoom.log

After doing a little debugging the error is caused by this line: https://github.com/sheagcraig/JSSImporter/blob/v1.0.0-beta2/JSSImporter.py#L375

Hi @Yohan460 Thanks for sending me this.

Without the full traceback, I'm a little more lost here, so if you could recreate it through the debugging you did earlier, that would probably help.

The error to me appears that what is happening is freaking out because something is calling the python dictionary get() method, but instead of a variable being a python dictionary, it's actually an NSTaggedPointerString, which has no idea what the get() method is.

I agree with your pointing to the processing of environment variables, because these are probably picked up by AutoPkg using PyObjC and using NSUserDefaults, which is why the values would be NSTaggedPointerString instead of a native python string or dict.

So I think we're on the right track-let's look at full call stack in the traceback and see if that gives any hints as to which one of these args might be the bad one. From your log, they all look perfectly fine...

Well, wait. Your JSS_REPOS value is a dict, with key 0 having a value of another dict for the repo.

This may be just the way AutoPkg is formatting it for output, but JSS_REPOS value should be a list of dicts, not a dict of dicts.

i.e. in the prefs file:

<key>JSS_REPOS</key>
<array>
    <dict>
        <key>URL</key>
        <string>secret</string>
        <key>name</key>
        <string>DDS DP</string>
        <key>type</key>
        <string>SMB</string>
    </dict>
</array>

Was an issue with the syntax of the JSS_REPOS, was set correctly in Xcode, but upon looking a the plist directly I saw that there was a key associated with the nested dict for some reason,.