Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
core_tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
QuTech QDLabs
core_tools
Commits
891587cb
Commit
891587cb
authored
2 years ago
by
Sander de Snoo
Browse files
Options
Downloads
Patches
Plain Diff
Improved error message
parent
e0440efa
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core_tools/data/lib/data_class.py
+1
-3
1 addition, 3 deletions
core_tools/data/lib/data_class.py
with
1 addition
and
3 deletions
core_tools/data/lib/data_class.py
+
1
−
3
View file @
891587cb
...
...
@@ -5,8 +5,6 @@ from dataclasses import dataclass, field
import
uuid
import
numpy
as
np
import
numbers
import
json
class
dataclass_raw_parent
:
...
...
@@ -45,7 +43,7 @@ class dataclass_raw_parent:
input_data (dict): dict formatted as e.g. write_data({
'
id(parameter_1)
'
: parameter_1.get(), id(parameter_2) : parameter_2.get(), ..})
'''
if
self
.
id_info
not
in
input_data
.
keys
():
txt
=
'
Key
not found
. A write is attempted to a parameter that has not been declaired yet.
'
txt
=
f
'
Key
{
self
.
id_info
}
not found in
{
input_data
.
keys
()
}
. A write is attempted to a parameter that has not been declaired yet.
'
txt
+=
'
Please first register the parameter with register_set_parameter/register_get_parameter
'
raise
KeyError
(
txt
)
data_in
=
input_data
[
self
.
id_info
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment