Skip to content

Unable to close db- failed to enable constraints #16

@cmatthew11

Description

@cmatthew11

I am editing a file using the API which all seems to be fine, but when I go to save the file with "db.Close()" it gives the below error. Can anyone help troubleshoot what the constaints that aren't being enabled are and how to identify them? Thanks

IOException: PLEXOS API Error: Error saving the input datafile to C:\Users\Chris\Desktop\Coding\Python\PLEXOS\PLEXOS API\1.elec_model\1.elec_model.xml
Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
at PLEXOS_NET.Core.Base.ThrowError(String strException, Exception ex)
at PLEXOS_NET.Core.Connection.CloseConnection(ConnectionType DataType)
at PLEXOS_NET.Core.DatabaseCore.Close()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions