Open-Systems-Pharmacology / PK-Sim

PK-Sim® is a comprehensive software tool for whole-body physiologically based pharmacokinetic modeling
Other
98 stars 49 forks source link

PK-sim suddenly gives een error when opening the model, can I retrieve it? #2875

Open KarenLeys opened 4 months ago

KarenLeys commented 4 months ago

Hello,

I get the following error message when I try to open my PK-sim model for fentanyl that seemed to work perfectly last time I opened it and worked on it last week. After the error is closed, none of the inputs (individual, compounds, etc) I put into the software are there. I don't know what changed from all other times I saved, closed and then tried to open the model again. Can my model be retrieved or do I have to start from scratch? (Last backup was several weeks ago.)

Application: PK-Sim® 11.2.142

Value cannot be null. Parameter name: key

Stack trace:

at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at OSPSuite.Utility.Collections.Cache`2.Add(TKey key, TValue value)
   at OSPSuite.Utility.Collections.Cache`2.Add(TValue value)
   at OSPSuite.Serializer.Xml.XmlEnumerationNodeMapper`3.Deserialize(TObject objectToDeserialize, XElement element, TContext context)
   at OSPSuite.Serializer.Xml.XmlSerializer`2.TypedDeserialize(TObject objectToDeserialize, XElement outputToDeserialize, TContext context)
   at OSPSuite.Core.Serialization.Xml.DataRepositoryXmlSerializer.TypedDeserialize(DataRepository dataRepository, XElement outputToDeserialize, SerializationContext serializationContext)
   at OSPSuite.Serializer.Xml.XmlSerializer`2.Deserialize(XElement outputToDeserialize, TContext context)
   at OSPSuite.Serializer.Xml.XmlSerializer`2.Deserialize[T](XElement outputToDeserialize, TContext context)
   at PKSim.Infrastructure.Serialization.Xml.XmlReader`1.ReadFrom(XElement element, SerializationContext serializationContext)
   at PKSim.Infrastructure.Serialization.Xml.XmlSerializationManager.Deserialize[TObject](Byte[] serializationBytes, SerializationContext serializationContext)
   at PKSim.Core.Services.CompressedSerializationManager.Deserialize[TObject](Byte[] serializationBytes, SerializationContext serializationContext)
   at PKSim.Infrastructure.Serialization.ORM.Mappers.ProjectMetaDataToProjectMapper.mapFrom(ObservedDataMetaData observedDataMetaData)
   at PKSim.Infrastructure.Serialization.ORM.Mappers.ProjectMetaDataToProjectMapper.<MapFrom>b__6_0(ObservedDataMetaData x)
   at OSPSuite.Utility.Extensions.EnumerableExtensions.Each[T](IEnumerable`1 list, Action`1 action)
   at PKSim.Infrastructure.Serialization.ORM.Mappers.ProjectMetaDataToProjectMapper.MapFrom(ProjectMetaData projectMetaData)
   at PKSim.Infrastructure.Serialization.ProjectPersistor.projectFrom(ProjectMetaData projectMetaData)
   at PKSim.Infrastructure.Serialization.ProjectPersistor.Load(ISession session)
   at PKSim.Infrastructure.Serialization.WorkspacePersistor.LoadSession(ICoreWorkspace workspace, String fileFullPath)
   at PKSim.Infrastructure.Workspace.<>c__DisplayClass17_0.<OpenProject>b__0()
   at PKSim.Infrastructure.Workspace.LoadProject(Action projectLoadAction)
   at PKSim.Infrastructure.Workspace.OpenProject(String fileFullPath)
   at PKSim.Presentation.Services.ProjectTask.<>c__DisplayClass32_0.<openProjectFromFile>g__openProject|0()
   at OSPSuite.Presentation.Services.HeavyWorkManager.doWork()
   at OSPSuite.Presentation.Services.HeavyWorkManager.<.ctor>b__9_1(Object o, DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

Thanks for taking a look! Karen

Yuri05 commented 4 months ago

Is it possible to upload your project (zip it first)?

KarenLeys commented 4 months ago

Fentanyl with error.zip Here is the zip file.

Yuri05 commented 4 months ago

3 observed data sets were corrupted. After removing them: it is possible to open the project (s. the attachment here). The removed observed data sets were not used in any simulation. If you need to use them later, you need to reimport the data.

Fentanyl (2)_repaired.zip

Which version of PK-Sim did you use when you imported those observed data sets?

Yuri05 commented 4 months ago

@msevestre Exactly the same problem as here Again, extended property without a name

Problematic data set

``` AAEAAAD/////AQAAAAAAAAAPAQAAAAsAAAALnr2dQJ69HUFainFBlTSgQQAA8EEAADRCAABwQgAAtEIAAPBCAAA0QwAAcEML AAEAAAD/////AQAAAAAAAAAPAQAAAAsAAAALK+ShL7xrJDDzPkAw3XopMMe2EjCaitkv0i+7LwrVnC9jiYMvu5leL7AgNi8L ```

KarenLeys commented 4 months ago

Thank you so much!

I used PK-Sim 11.2

Did I do something wrong to cause this corruption or is there any way for me to avoid getting in this situation again?

Yuri05 commented 4 months ago

Did I do something wrong to cause this corruption or is there any way for me to avoid getting in this situation again?

It's a glitch in the software, which is very rare and hard to reproduce.