Comments (2)
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.
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)
- projects.list() per_page limit does not return empty list HOT 1
- Accept raw Taurus data objects and templates for `register` HOT 4
- Include api_error in BadRequest exception message HOT 2
- Code duplication and lack of error checking in get_type()
- Serialization properties cannot be defined in parent classes HOT 1
- Add tests_require to setup.py HOT 1
- Add `@alpha` decorator to provide runtime warnings of alpha usages HOT 1
- Limit discussion of access control to its own section. HOT 1
- Cannot import citrine in python 3.5 HOT 4
- Predictor Report documentation is out of date HOT 1
- Outdated documentation which references `citrine.attributes`
- Include soft-links in data object `__repr__` HOT 3
- Break predictors.py into several files HOT 1
- Change "unique_label" to "name" HOT 1
- `Update` does not work for data concepts collections HOT 1
- test_measurement_material_connection_rehydration broken HOT 1
- What publication(s) should I cite when referring to the Open Citrine Platform? HOT 2
- Guarantee unused ingredients appear in gemtable HOT 1
- Flesh out Contributing.md HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from citrine-python.