Skip to content

receiving error on writing #70

@OfficeUnlimited

Description

@OfficeUnlimited

Hi Project.
Using this piece of code:

foreach (var myClassofBasicStrings in ListOf_myClassofBasicStrings)
{

    var pointToWrite = new Point()
    {
        Name = serie, // serie/measurement/table to write into
        Tags = new Dictionary<string, object>()
        {
            { "Tag1", "Value1" }
        },

        Fields = myClassofBasicStrings.GetType()
        .GetProperties(BindingFlags.Instance | BindingFlags.Public)
            .ToDictionary(prop => prop.Name, prop => prop.GetValue(myClassofBasicStrings, null)),

        Timestamp = DateTime.UtcNow  // optional (can be set to any DateTime moment)
    };

    pointsToWrite.Add(pointToWrite);
}

var response = client.Client.WriteAsync(pointsToWrite, dbname);

When calling the write I receive: Value cannot be null. Parameter name: value
Any ideas? The points seems valid with valid data. Each point has a 'name' attribute set.
Thanks,
Ronald

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions