Scope-IT / marksman

Windows agent for Snipe-IT asset management system
Apache License 2.0
132 stars 23 forks source link

Manufacturer is NULL on Lenovo ThinkStation T710 #2

Closed velaar closed 6 years ago

velaar commented 6 years ago
Unhandled Exception: SnipeSharp.Exceptions.RequiredValueIsNullException: Property Manufacturer cannot be null.
   at SnipeSharp.Endpoints.QueryParameterBuilder.GetParameters(Object item)
   at SnipeSharp.Common.RequestManagerRestSharp.Post(String path, ICommonEndpointModel item)
   at SnipeSharp.Endpoints.EndpointManager`1.Create(T toCreate)
   at Marksman.Sentry.GetAsset(NameValueCollection appSettings, SnipeItApi snipe)
   at Marksman.Marksman.Main(String[] args)

However WMI explorer shows "LENOVO" as a manufacturer After manually creating the manufacturer got

7/3/2018 12:10:36 PM: Started application.

Unhandled Exception: SnipeSharp.Exceptions.RequiredValueIsNullException: Property Category cannot be null.
   at SnipeSharp.Endpoints.QueryParameterBuilder.GetParameters(Object item)
   at SnipeSharp.Common.RequestManagerRestSharp.Post(String path, ICommonEndpointModel item)
   at SnipeSharp.Endpoints.EndpointManager`1.Create(T toCreate)
   at Marksman.Sentry.GetAsset(NameValueCollection appSettings, SnipeItApi snipe)
   at Marksman.Marksman.Main(String[] args)

Category - > null

tcintura commented 6 years ago

Hi there,

How can I correct this? I'm getting the same error.

Thanks

velaar commented 6 years ago

@danielhogg needs to review the PR #4 (today?) and then we'll make a quick bugfix release.

danielhogg commented 6 years ago

Issue fixed in the latest commit.

narayan07 commented 6 years ago

Hi, I have Followed the installation process of marksman as mentioned -Download and install the latest .msi installer from the releases tab. -By default, the program will be installed in Program Files (x86)/ScopeIT/Marksman. Edit the Marksman.exe.config file to include your API key and BaseURI from the default values to the ones given by your Snipe-IT instance. -Set the Company and Location parameters in Marksman.exe.config, then run the .exe.

When i tried to run the .exe file it gives an error image

I have seen that this issue is resolved here https://github.com/Scope-IT/marksman/pull/4 But i don't know how to implement these changes in the file , b'coz i just run the installer application and it automatically installed on C drive and i changed the details in marksman.exe.config file. So please suggest me , i am quite new to this.

emike09 commented 5 years ago

Seems the issue persists in the latest build? Even with the error, the manufacturer seems to populate fine through the API when creating a new asset.