Code Monkey home page Code Monkey logo

Comments (4)

chitsaw avatar chitsaw commented on May 15, 2024

Sometimes we get these sorts of exceptions during deserialization when \psi is unable to locate the Type needed to deserialize an object (which may be nested). Typically this happens when you are trying to deserialize an object which contains a reference to a polymorphic type via its interface or base class, and the runtime is not able to instantiate a serializer for the derived type because it does not have a reference to the defining assembly.

The way to get around this is to register the missing type for serialization somewhere in your code before you attempt to read the data from the store. Based on your exception message above, could you try adding the following to your code:

using EmotionRepresentation;
using Microsoft.Psi.Serialization;
...
KnownSerializers.Default.Register<EmotionCategory.Category>();

from psi.

profwillie avatar profwillie commented on May 15, 2024

Unfortunately that did not work. Any other suggestions?

from psi.

chitsaw avatar chitsaw commented on May 15, 2024

You could try registering with the full type name, though I would have thought this to be unnecessary unless your assembly/type name has changed in some way:

KnownSerializers.Default.Register<EmotionCategory.Category>("EmotionRepresentation.EmotionCategory+Category, EmotionRepresentation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null");

Other than that, I can't think of anything else at the moment. If you would be willing to share your code and the data store, perhaps I could take a closer look to get to the bottom of this (it would be helpful for us too to understand why this doesn't work).

from psi.

profwillie avatar profwillie commented on May 15, 2024

Yes, I will send some code and a data store next week.

from psi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.