Giter Club home page Giter Club logo

Comments (2)

maxhutch avatar maxhutch commented on August 17, 2024 1
In [1]: from citrine.resources.process_spec import ProcessSpec                                                        

In [2]: ProcessSpec(name=2)                                                                                           
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-2-9de3d39a73b5> in <module>
----> 1 ProcessSpec(name=2)

~/anaconda3/envs/taurus/lib/python3.7/site-packages/citrine/resources/process_spec.py in __init__(self, name, uids, tags, notes, conditions, parameters, template, file_links)
     81         TaurusProcessSpec.__init__(self, name=name, uids=set_default_uid(uids),
     82                                    tags=tags, conditions=conditions, parameters=parameters,
---> 83                                    template=template, file_links=file_links, notes=notes)
     84 
     85     def __str__(self):

~/anaconda3/envs/taurus/lib/python3.7/site-packages/taurus/entity/object/process_spec.py in __init__(self, name, template, parameters, conditions, uids, tags, notes, file_links)
     56                  uids=None, tags=None, notes=None, file_links=None):
     57         BaseObject.__init__(self, name=name, uids=uids, tags=tags, notes=notes,
---> 58                             file_links=file_links)
     59         HasParameters.__init__(self, parameters=parameters)
     60         HasConditions.__init__(self, conditions=conditions)

~/anaconda3/envs/taurus/lib/python3.7/site-packages/taurus/entity/object/base_object.py in __init__(self, name, uids, tags, notes, file_links)
     35         self._file_links = None
     36 
---> 37         self.name = name
     38         self.file_links = file_links
     39 

~/anaconda3/envs/taurus/lib/python3.7/site-packages/citrine/_serialization/properties.py in __set__(self, obj, value)
     92         else:
     93             # if value is not an underlying type, set its deserialized version.
---> 94             value_to_set = self.deserialize(value)
     95 
     96         base_class = _get_base_class(obj, self.serialization_path)

~/anaconda3/envs/taurus/lib/python3.7/site-packages/citrine/_serialization/properties.py in deserialize(self, value)
     49         if not isinstance(value, self.serialized_types):
     50             raise ValueError('{} is not one of valid types: '
---> 51                              '{}!'.format(value, self.serialized_types))
     52         return self._deserialize(value)
     53 

ValueError: 2 is not one of valid types: <class 'str'>!

from citrine-python.

crleblanc avatar crleblanc commented on August 17, 2024

Hi @maxhutch, is it possible to give me a small example that demonstrates this? I'm still learning the basics of citrine-python so an example how be really useful.

from citrine-python.

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.