Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Receiving "Instances of 'NoneType'" error message when running spruce #54

Open
ghost opened this issue May 6, 2021 · 3 comments
Open

Comments

@ghost
Copy link

ghost commented May 6, 2021

I am also getting errors when running jss_helper as well that seem like they may be related to this.

When I run spruce, here is the output I receive:

lcacioppo@CSI361362 Desktop % /usr/local/autopkg/python ~/Desktop/spruce.py   
JSS: https://jamf-pro-url:8443
Preferences used: ~/Library/Preferences/com.github.autopkg.plist
*  Building: Computer Report... *
Traceback (most recent call last):
  File "/Users/lcacioppo/Desktop/spruce.py", line 2436, in <module>
    main()
  File "/Users/lcacioppo/Desktop/spruce.py", line 2432, in main
    run_reports(args)
  File "/Users/lcacioppo/Desktop/spruce.py", line 2187, in run_reports
    results.append(func(**args_dict))
  File "/Users/lcacioppo/Desktop/spruce.py", line 650, in build_computers_report
    report = build_device_report(check_in_period, all_computers)
  File "/Users/lcacioppo/Desktop/spruce.py", line 448, in build_device_report
    ) = get_version_and_model_spread(devices)
  File "/Users/lcacioppo/Desktop/spruce.py", line 601, in get_version_and_model_spread
    strings = sorted(get_histogram_strings(model_counts, padding=8), key=model_compare)
TypeError: '<' not supported between instances of 'NoneType' and 'str'
@grahampugh
Copy link
Member

Just for completeness, can I check that you have given the additional permissions to your API user that Spruce requires?

For complete reporting, the API user will need at least Read privileges on the following (along with the required API permissions for JSSImporter):

Computers
Configurations
eBooks
macOS Configuration Profiles
Mobile Devices
Mobile Device Apps
Mobile Device Configuration Profiles
Printers
Provisioning Profiles
Smart Mobile Device Groups
Static Mobile Device Groups

@ghost
Copy link
Author

ghost commented May 6, 2021

Yes, I just went through and validated now that Read permissions for each of those items is checkmarked

@bjohnson-MHC
Copy link

I'm also experiencing this issue since the last time I ran Spruce (in January of this year). Running the script from a computer on 10.14.6 with known-good AutoPkg.plist to a JSS on 10.26.1
Worked fine in January. Now barfs with the same error output as above, except my line numbers differ. May 4, 2020 is the date on the spruce.py.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants