jssimporter / Spruce

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

Unable to run mobile device report #7

Closed opragel closed 5 years ago

opragel commented 9 years ago

In the current testing branch, I'm getting errors when spruce attempts to run a mobile device report. Let me know what I can provide to give more insight.

$ python spruce.py --verbose -d
🌲  Building: Mobile Device Report... 🌲
Traceback (most recent call last):
  File "spruce.py", line 1668, in <module>
    main()
  File "spruce.py", line 1664, in main
    run_reports(args)
  File "spruce.py", line 1611, in run_reports
    results.append(func(**args_dict))
  File "spruce.py", line 719, in build_mobile_devices_report
    report = build_device_report(check_in_period, mobile_devices)
  File "spruce.py", line 468, in build_device_report
    device_name = device_type(devices)
  File "spruce.py", line 559, in device_type
    raise ValueError
ValueError

The rest of the reports seem to succeed:

$ python spruce.py -a
🌲  Building: Computer Groups Report... 🌲
🌲  Building: Computer Configuration Profile Report... 🌲
🌲  Building: Mobile Device Configuration Profile Report... 🌲
🌲  Building: Mobile Device Group Report... 🌲
🌲  Building: Computer Report... 🌲
🌲  Building: Mobile Apps... 🌲
🌲  Building: Policy Report... 🌲
🌲  Building: Scripts Report... 🌲
🌲  Building: Mobile Device Report... 🌲
Traceback (most recent call last):
  File "spruce.py", line 1668, in <module>
    main()
  File "spruce.py", line 1664, in main
    run_reports(args)
  File "spruce.py", line 1611, in run_reports
    results.append(func(**args_dict))
  File "spruce.py", line 719, in build_mobile_devices_report
    report = build_device_report(check_in_period, mobile_devices)
  File "spruce.py", line 468, in build_device_report
    device_name = device_type(devices)
  File "spruce.py", line 559, in device_type
    raise ValueError
ValueError
sheagcraig commented 9 years ago

I wonder if you could figure out what is going on here... If you insert a line after line 557: print {type(device) for device in devices} and run again, you should see it print (at least) one set... That set SHOULD only have one member, jss.MobileDevice. Depending on where it blows up, you may see this set printed up to three times; but what I'm interested to know is which classes are members of that set. It should be exactly that one above; if it's missing that, or has any othe rmembers, let me know.