jssimporter / Spruce

Spruce is deprecated. Please see the wiki for alternatives.
GNU General Public License v3.0
148 stars 22 forks source link

AttributeError: 'Element' object has no attribute 'getchildren' #53

Closed ExpressionlessCode closed 3 years ago

ExpressionlessCode commented 3 years ago

Unable to run any of the commands besides -h as I always receive this error. python-jss 2.1.0 is installed and I have replicated the same error across multiple machines (Big Sur and Catalina)

Any suggestions? Screenshot of the entire output is attached.

Screenshot 2021-04-16 at 12 33 26
grahampugh commented 3 years ago

I can't see the command you used, but can you try running Spruce using python3. Specifically, I recommend that you install AutoPkg and JSSImporter, and then run spruce as /usr/local/autopkg/python /path/to/spruce.py.

ExpressionlessCode commented 3 years ago

My company has their own python install setup within the Library which is python3 and I have specified this at the top of the spruce.py script to ensure the right python install is being used. All dependencies were installed on this specific python installation as well.

The error looks related to the XML Element tree so I don't think that my python3 install is the cause but I will give the AutoPkg route a try and report back.

grahampugh commented 3 years ago

If that was the case then I would assume that it's working for nobody. You might need the version of python-jss that is bundled into JSSImporter, at least.

ExpressionlessCode commented 3 years ago

I did ensure that python-jss 2.1.0 was installed as it says in the Spruce repo. You are correct that it would be affecting everybody so maybe something didn't install correctly. Will test out and let you know.

ExpressionlessCode commented 3 years ago

Guess something didn't install properly. I've setup AutoPkg and JSSImporter and it's now running without that error. Strange, unsure what didn't install properly but at least it's working! Sorry to have wasted your time.