---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-13-a8ab94870854> in <module>
1 outdir = "example_output"
----> 2 submission.create_files(outdir)
~/.local/lib/python3.6/site-packages/hepdata_lib/__init__.py in create_files(self, outdir)
515 # Write all the tables
516 for table in self.tables:
--> 517 table.write_output(outdir)
518
519 # Copy additional resource files
~/.local/lib/python3.6/site-packages/hepdata_lib/__init__.py in write_output(self, outdir)
264 """
265 self.write_images(outdir)
--> 266 self.write_yaml(outdir)
267
268 def write_images(self, outdir):
~/.local/lib/python3.6/site-packages/hepdata_lib/__init__.py in write_yaml(self, outdir)
339 outdir, '{NAME}.yaml'.format(NAME=shortname))
340 with open(outfile_path, 'w') as outfile:
--> 341 yaml.dump(table, outfile, default_flow_style=False)
342
343 # Add entry to central submission file
/cvmfs/sft.cern.ch/lcg/views/LCG_96python3/x86_64-centos7-gcc8-opt/lib/python3.6/site-packages/yaml/__init__.py in dump(data, stream, Dumper, **kwds)
288 If stream is None, return the produced string instead.
289 """
--> 290 return dump_all([data], stream, Dumper=Dumper, **kwds)
291
292 def safe_dump_all(documents, stream=None, **kwds):
/cvmfs/sft.cern.ch/lcg/views/LCG_96python3/x86_64-centos7-gcc8-opt/lib/python3.6/site-packages/yaml/__init__.py in dump_all(documents, stream, Dumper, default_style, default_flow_style, canonical, indent, width, allow_unicode, line_break, encoding, explicit_start, explicit_end, version, tags, sort_keys)
276 dumper.open()
277 for data in documents:
--> 278 dumper.represent(data)
279 dumper.close()
280 finally:
/cvmfs/sft.cern.ch/lcg/views/LCG_96python3/x86_64-centos7-gcc8-opt/lib/python3.6/site-packages/yaml/representer.py in represent(self, data)
25
26 def represent(self, data):
---> 27 node = self.represent_data(data)
28 self.serialize(node)
29 self.represented_objects = {}
/cvmfs/sft.cern.ch/lcg/views/LCG_96python3/x86_64-centos7-gcc8-opt/lib/python3.6/site-packages/yaml/representer.py in represent_data(self, data)
46 data_types = type(data).__mro__
47 if data_types[0] in self.yaml_representers:
---> 48 node = self.yaml_representers[data_types[0]](self, data)
49 else:
50 for data_type in data_types:
/cvmfs/sft.cern.ch/lcg/views/LCG_96python3/x86_64-centos7-gcc8-opt/lib/python3.6/site-packages/yaml/representer.py in represent_dict(self, data)
205
206 def represent_dict(self, data):
--> 207 return self.represent_mapping('tag:yaml.org,2002:map', data)
208
209 def represent_set(self, data):
/cvmfs/sft.cern.ch/lcg/views/LCG_96python3/x86_64-centos7-gcc8-opt/lib/python3.6/site-packages/yaml/representer.py in represent_mapping(self, tag, mapping, flow_style)
116 for item_key, item_value in mapping:
117 node_key = self.represent_data(item_key)
--> 118 node_value = self.represent_data(item_value)
119 if not (isinstance(node_key, ScalarNode) and not node_key.style):
120 best_style = False
/cvmfs/sft.cern.ch/lcg/views/LCG_96python3/x86_64-centos7-gcc8-opt/lib/python3.6/site-packages/yaml/representer.py in represent_data(self, data)
46 data_types = type(data).__mro__
47 if data_types[0] in self.yaml_representers:
---> 48 node = self.yaml_representers[data_types[0]](self, data)
49 else:
50 for data_type in data_types:
/cvmfs/sft.cern.ch/lcg/views/LCG_96python3/x86_64-centos7-gcc8-opt/lib/python3.6/site-packages/yaml/representer.py in represent_list(self, data)
197 # break
198 #if not pairs:
--> 199 return self.represent_sequence('tag:yaml.org,2002:seq', data)
200 #value = []
201 #for item_key, item_value in data:
/cvmfs/sft.cern.ch/lcg/views/LCG_96python3/x86_64-centos7-gcc8-opt/lib/python3.6/site-packages/yaml/representer.py in represent_sequence(self, tag, sequence, flow_style)
90 best_style = True
91 for item in sequence:
---> 92 node_item = self.represent_data(item)
93 if not (isinstance(node_item, ScalarNode) and not node_item.style):
94 best_style = False
/cvmfs/sft.cern.ch/lcg/views/LCG_96python3/x86_64-centos7-gcc8-opt/lib/python3.6/site-packages/yaml/representer.py in represent_data(self, data)
46 data_types = type(data).__mro__
47 if data_types[0] in self.yaml_representers:
---> 48 node = self.yaml_representers[data_types[0]](self, data)
49 else:
50 for data_type in data_types:
/cvmfs/sft.cern.ch/lcg/views/LCG_96python3/x86_64-centos7-gcc8-opt/lib/python3.6/site-packages/yaml/representer.py in represent_dict(self, data)
205
206 def represent_dict(self, data):
--> 207 return self.represent_mapping('tag:yaml.org,2002:map', data)
208
209 def represent_set(self, data):
/cvmfs/sft.cern.ch/lcg/views/LCG_96python3/x86_64-centos7-gcc8-opt/lib/python3.6/site-packages/yaml/representer.py in represent_mapping(self, tag, mapping, flow_style)
116 for item_key, item_value in mapping:
117 node_key = self.represent_data(item_key)
--> 118 node_value = self.represent_data(item_value)
119 if not (isinstance(node_key, ScalarNode) and not node_key.style):
120 best_style = False
/cvmfs/sft.cern.ch/lcg/views/LCG_96python3/x86_64-centos7-gcc8-opt/lib/python3.6/site-packages/yaml/representer.py in represent_data(self, data)
46 data_types = type(data).__mro__
47 if data_types[0] in self.yaml_representers:
---> 48 node = self.yaml_representers[data_types[0]](self, data)
49 else:
50 for data_type in data_types:
/cvmfs/sft.cern.ch/lcg/views/LCG_96python3/x86_64-centos7-gcc8-opt/lib/python3.6/site-packages/yaml/representer.py in represent_list(self, data)
197 # break
198 #if not pairs:
--> 199 return self.represent_sequence('tag:yaml.org,2002:seq', data)
200 #value = []
201 #for item_key, item_value in data:
/cvmfs/sft.cern.ch/lcg/views/LCG_96python3/x86_64-centos7-gcc8-opt/lib/python3.6/site-packages/yaml/representer.py in represent_sequence(self, tag, sequence, flow_style)
90 best_style = True
91 for item in sequence:
---> 92 node_item = self.represent_data(item)
93 if not (isinstance(node_item, ScalarNode) and not node_item.style):
94 best_style = False
/cvmfs/sft.cern.ch/lcg/views/LCG_96python3/x86_64-centos7-gcc8-opt/lib/python3.6/site-packages/yaml/representer.py in represent_data(self, data)
46 data_types = type(data).__mro__
47 if data_types[0] in self.yaml_representers:
---> 48 node = self.yaml_representers[data_types[0]](self, data)
49 else:
50 for data_type in data_types:
~/.local/lib/python3.6/site-packages/hepdata_lib/__init__.py in dict_representer(dumper, data)
29 def dict_representer(dumper, data):
30 """represent dict."""
---> 31 return dumper.represent_dict(data.iteritems())
32
33
AttributeError: 'collections.defaultdict' object has no attribute 'iteritems'