I am trying to preset product records using the following datafile:
<openerp>
<data>
<record id="product_template_ovhssd3" model="product.template">
<field name="name">OVH SSD 3</field>
<field name="list_price">14.51</field>
<field name="sale_ok">False</field>
<field name="categ_id" ref="category_vps"/>
<field name="type">consu</field>
</record>
</data>
</openerp>
This results in the following error in the openerp log file:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 177, in run_wsgi
execute(self.server.app)
File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 165, in execute
application_iter = app(environ, start_response)
File "/usr/lib/python2.7/dist-packages/openerp/service/server.py", line 291, in app
return self.app(e, s)
File "/usr/lib/python2.7/dist-packages/openerp/service/wsgi_server.py", line 216, in application
return application_unproxied(environ, start_response)
File "/usr/lib/python2.7/dist-packages/openerp/service/wsgi_server.py", line 202, in application_unproxied
result = handler(environ, start_response)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 1293, in __call__
return self.dispatch(environ, start_response)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 1267, in __call__
return self.app(environ, start_wrapped)
File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 588, in __call__
return self.app(environ, start_response)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 1431, in dispatch
ir_http = request.registry['ir.http']
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 349, in registry
return openerp.modules.registry.RegistryManager.get(self.db) if self.db else None
File "/usr/lib/python2.7/dist-packages/openerp/modules/registry.py", line 339, in get
update_module)
File "/usr/lib/python2.7/dist-packages/openerp/modules/registry.py", line 370, in new
openerp.modules.load_modules(registry._db, force_demo, status, update_module)
File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 351, in load_modules
force, status, report, loaded_modules, update_module)
File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 255, in load_marked_modules
loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 176, in load_module_graph
_load_data(cr, module_name, idref, mode, kind='data')
File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 118, in _load_data
tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
File "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 900, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 986, in convert_xml_import
obj.parse(doc.getroot(), mode=mode)
File "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 852, in parse
self._tags[rec.tag](self.cr, rec, n, mode=mode)
File "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 692, in _tag_record
model = self.pool[rec_model]
File "/usr/lib/python2.7/dist-packages/openerp/modules/registry.py", line 102, in __getitem__
return self.models[model_name]
ParseError: "product.template" while parsing /vagrant/infrastructure/data/product_template.xml:12, near
<record id="product_template_ovhssd3" model="product.template">
<field name="name">OVH SSD 3</field>
<field name="list_price">14.51</field>
<field name="sale_ok">False</field>
<field name="categ_id" ref="category_vps"/>
<field name="type">consu</field>
</record>
My question is: what am I doing wrong? I tried model="product.product" as well, same difference.
Make sure you listed product module in your depends list in __openerp__.py.
Related
I want to fine-tune a pre-trained huggingface model for a particular domain. From this answer I know I can do it using run_mlm.py but I can't understan which format should I use for my text file. I tried to use a simple structure with one document per line and I get the following error:
python run_mlm.py --model_name_or_path "neuralmind/bert-base-portuguese-cased" --train_file ../data/full_corpus.csv --output models/ --do_train
Traceback (most recent call last):
File "run_mlm.py", line 449, in <module>
main()
File "run_mlm.py", line 384, in main
load_from_cache_file=not data_args.overwrite_cache,
File "/mnt/sdb/data-mwon/paperChega/env2/lib/python3.6/site-packages/datasets/dataset_dict.py", line 303, in map
for k, dataset in self.items()
File "/mnt/sdb/data-mwon/paperChega/env2/lib/python3.6/site-packages/datasets/dataset_dict.py", line 303, in <dictcomp>
for k, dataset in self.items()
File "/mnt/sdb/data-mwon/paperChega/env2/lib/python3.6/site-packages/datasets/arrow_dataset.py", line 1260, in map
update_data=update_data,
File "/mnt/sdb/data-mwon/paperChega/env2/lib/python3.6/site-packages/datasets/arrow_dataset.py", line 157, in wrapper
out: Union["Dataset", "DatasetDict"] = func(self, *args, **kwargs)
File "/mnt/sdb/data-mwon/paperChega/env2/lib/python3.6/site-packages/datasets/fingerprint.py", line 163, in wrapper
out = func(self, *args, **kwargs)
File "/mnt/sdb/data-mwon/paperChega/env2/lib/python3.6/site-packages/datasets/arrow_dataset.py", line 1529, in _map_single
writer.write_batch(batch)
File "/mnt/sdb/data-mwon/paperChega/env2/lib/python3.6/site-packages/datasets/arrow_writer.py", line 278, in write_batch
pa_table = pa.Table.from_pydict(typed_sequence_examples)
File "pyarrow/table.pxi", line 1474, in pyarrow.lib.Table.from_pydict
File "pyarrow/array.pxi", line 322, in pyarrow.lib.asarray
File "pyarrow/array.pxi", line 222, in pyarrow.lib.array
File "pyarrow/array.pxi", line 110, in pyarrow.lib._handle_arrow_array_protocol
File "/mnt/sdb/data-mwon/paperChega/env2/lib/python3.6/site-packages/datasets/arrow_writer.py", line 100, in __arrow_array__
if trying_type and out[0].as_py() != self.data[0]:
File "pyarrow/array.pxi", line 1058, in pyarrow.lib.Array.__getitem__
File "pyarrow/array.pxi", line 540, in pyarrow.lib._normalize_index
IndexError: index out of bounds
Hello I'm usually coding in Odoo v10 and +,
Now I have to code on OpenERP 7, and I don't succeed to do a simple Xpath !
Here is my XML stock_view.xml
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<!--...-->
<!--...-->
<record model="ir.ui.view" id="view_picking_in_form_adquat">
<field name="name">stock.picking.in.adquat</field>
<field name="model">stock.picking.in</field>
<field name="inherit_id" ref="stock.view_picking_in_form"/>
<field name="arch" type="xml">
<xpath expr="/field[#name='origin']" > <!--position="after"--> <!--...-->
<string>I'm Here</string>
</xpath>
</field>
</record>
<!--... -->
</data>
</openerp>
It seems the error is in the arch field : "ValidateError Error occurred while validating the field(s) arch: Invalid XML for View Architecture"
Client Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/openerp/addons/web/http.py", line 204, in dispatch
response["result"] = method(self, **self.params)
File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1135, in call_button
action = self._call_kw(req, model, method, args, {})
File "/usr/lib/pymodules/python2.7/openerp/addons/web/controllers/main.py", line 1123, in _call_kw
return getattr(req.session.model(model), method)(*args, **kwargs)
File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 42, in proxy
result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)
File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 30, in proxy_method
result = self.session.send(self.service_name, method, *args)
File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 103, in send
raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)
Server Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/openerp/addons/web/session.py", line 89, in send
return openerp.netsvc.dispatch_rpc(service_name, method, args)
File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 292, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 622, in dispatch
security.check(db,uid,passwd)
File "/usr/lib/pymodules/python2.7/openerp/service/security.py", line 40, in check
pool = pooler.get_pool(db)
File "/usr/lib/pymodules/python2.7/openerp/pooler.py", line 49, in get_pool
return get_db_and_pool(db_name, force_demo, status, update_module)[1]
File "/usr/lib/pymodules/python2.7/openerp/pooler.py", line 33, in get_db_and_pool
registry = RegistryManager.get(db_name, force_demo, status, update_module)
File "/usr/lib/pymodules/python2.7/openerp/modules/registry.py", line 192, in get
update_module)
File "/usr/lib/pymodules/python2.7/openerp/modules/registry.py", line 218, in new
openerp.modules.load_modules(registry.db, force_demo, status, update_module)
File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 350, in load_modules
force, status, report, loaded_modules, update_module)
File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 256, in load_marked_modules
loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 188, in load_module_graph
load_data(module_name, idref, mode)
File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 76, in <lambda>
load_data = lambda *args: _load_data(cr, *args, kind='data')
File "/usr/lib/pymodules/python2.7/openerp/modules/loading.py", line 124, in _load_data
tools.convert_xml_import(cr, module_name, fp, idref, mode, noupdate, report)
File "/usr/lib/pymodules/python2.7/openerp/tools/convert.py", line 954, in convert_xml_import
obj.parse(doc.getroot())
File "/usr/lib/pymodules/python2.7/openerp/tools/convert.py", line 847, in parse
self._tags[rec.tag](self.cr, rec, n)
File "/usr/lib/pymodules/python2.7/openerp/tools/convert.py", line 814, in _tag_record
id = self.pool.get('ir.model.data')._update(cr, self.uid, rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode, context=rec_context )
File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_model.py", line 964, in _update
res_id = model_obj.create(cr, uid, values, context=context)
File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_ui_view.py", line 103, in create
return super(view, self).create(cr, uid, values, context)
File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 4472, in create
self._validate(cr, user, [id_new], context)
File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 1546, in _validate
raise except_orm('ValidateError', '\n'.join(error_msgs))
except_orm: ('ValidateError', u'Une erreur est apparue lors de la validation du/des champ(s) arch: Invalid XML for View Architecture!')
Can someone tell me if there is syntax differences between odoo and openerp ?
try this it may help you i think that you just need to add another slash
<xpath expr="//field[#name='original_field']" position="after">
<field name="new_field"/>
</xpath>
There is no section for new in Odoo 8 as described in Odoo 8 views.
XPath should be the same.
a field element with a name attribute matches the first field with the same name
You can add an element to the view using field:
<field name='origin' position="after">
<string>I'm Here</string>
</field>
Or just add another slash at the beginning of your XPath expression as mentioned by #imad.
I'm just following the tutorial step by step and even in this way I'm getting an error. Here in Extend the default Header chapter -> https://www.odoo.com/documentation/12.0/howtos/themes.html#extend-the-default-header
In Website/Configuration/Apps I install my theme, and then in Website/Configuration/Settings I click the button Choose Theme, and once there I select my theme for use.
However at this point an error message like this appears:
Error:
Odoo Server Error
Traceback (most recent call last):
File "/odoo/odoo-server/odoo/tools/convert.py", line 757, in parse
self._tags[rec.tag](rec, de, mode=mode)
File "/odoo/odoo-server/odoo/tools/convert.py", line 735, in _tag_template
return self._tag_record(record, data_node)
File "/odoo/odoo-server/odoo/tools/convert.py", line 573, in _tag_record
model = self.env[rec_model]
File "/odoo/odoo-server/odoo/api.py", line 820, in __getitem__
return self.registry[model_name]._browse((), self)
File "/odoo/odoo-server/odoo/modules/registry.py", line 176, in __getitem__
return self.models[model_name]
KeyError: 'theme.ir.ui.view'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/odoo/odoo-server/odoo/http.py", line 653, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/odoo/odoo-server/odoo/http.py", line 312, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/odoo/odoo-server/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/odoo/odoo-server/odoo/http.py", line 695, in dispatch
result = self._call_function(**self.params)
File "/odoo/odoo-server/odoo/http.py", line 344, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/odoo/odoo-server/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/odoo/odoo-server/odoo/http.py", line 337, in checked_call
result = self.endpoint(*a, **kw)
File "/odoo/odoo-server/odoo/http.py", line 938, in __call__
return self.method(*args, **kw)
File "/odoo/odoo-server/odoo/http.py", line 517, in response_wrap
response = f(*args, **kw)
File "/odoo/odoo-server/addons/web/controllers/main.py", line 966, in call_button
action = self._call_kw(model, method, args, {})
File "/odoo/odoo-server/addons/web/controllers/main.py", line 954, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/odoo/odoo-server/odoo/api.py", line 749, in call_kw
return _call_kw_multi(method, model, args, kwargs)
File "/odoo/odoo-server/odoo/api.py", line 736, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/odoo/odoo-server/addons/website_theme_install/models/ir_module_module.py", line 356, in button_choose_theme
self._theme_upgrade_upstream()
File "/odoo/odoo-server/addons/website_theme_install/models/ir_module_module.py", line 314, in _theme_upgrade_upstream
upper_theme.button_immediate_upgrade()
File "<decorator-gen-67>", line 2, in button_immediate_upgrade
File "/odoo/odoo-server/odoo/addons/base/models/ir_module.py", line 71, in check_and_log
return method(self, *args, **kwargs)
File "/odoo/odoo-server/odoo/addons/base/models/ir_module.py", line 596, in button_immediate_upgrade
return self._button_immediate_function(type(self).button_upgrade)
File "/odoo/odoo-server/odoo/addons/base/models/ir_module.py", line 535, in _button_immediate_function
modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "/odoo/odoo-server/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/odoo/odoo-server/odoo/modules/loading.py", line 422, in load_modules
force, status, report, loaded_modules, update_module, models_to_check)
File "/odoo/odoo-server/odoo/modules/loading.py", line 318, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "/odoo/odoo-server/odoo/modules/loading.py", line 224, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package, report=report)
File "/odoo/odoo-server/odoo/modules/loading.py", line 68, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)
File "/odoo/odoo-server/odoo/tools/convert.py", line 801, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "/odoo/odoo-server/odoo/tools/convert.py", line 864, in convert_xml_import
obj.parse(doc.getroot(), mode=mode)
File "/odoo/odoo-server/odoo/tools/convert.py", line 763, in parse
exc_info[2]
File "/odoo/odoo-server/odoo/tools/pycompat.py", line 86, in reraise
raise value.with_traceback(tb)
File "/odoo/odoo-server/odoo/tools/convert.py", line 757, in parse
self._tags[rec.tag](rec, de, mode=mode)
File "/odoo/odoo-server/odoo/tools/convert.py", line 735, in _tag_template
return self._tag_record(record, data_node)
File "/odoo/odoo-server/odoo/tools/convert.py", line 573, in _tag_record
model = self.env[rec_model]
File "/odoo/odoo-server/odoo/api.py", line 820, in __getitem__
return self.registry[model_name]._browse((), self)
File "/odoo/odoo-server/odoo/modules/registry.py", line 176, in __getitem__
return self.models[model_name]
odoo.tools.convert.ParseError: "theme.ir.ui.view" while parsing None:4, near
<data inherit_id="website.layout" name="Custom Header">
<!-- Assign an id -->
<xpath expr="//div[#id='wrapwrap']/header" position="attributes">
<attribute name="id">my_header</attribute>
</xpath>
<!-- Add an element after the top menu -->
<xpath expr="//div[#id='wrapwrap']/header/div" position="after">
<div class="container">
<div class="alert alert-info mt16" role="alert">
<strong>Welcome</strong> in our website!
</div>
</div>
</xpath>
</data>
What am I doing wrong? is it me or the tutorial is not updated?
Just to clarify, although at the bottom of the traceback appear a <data></data> tags, it's only here where is like this, because in my code at that position I have a <template></template> tags.
After many hours searching on the Internet for an answer to my question. I found that the problems were two in fact.
The first one is the need to append the 'website_theme_install' app in my depends in the manifest.py. It's not said anywhere in the tutorial, and I don't know why it was already installed in my Odoo instance, maybe is default in Odoo 12.0. This is what caused the KeyError: 'theme.ir.ui.view'.
The second was the fact that in the website.layout template which is itself inherited from the portal.frontend_layout template there is no div after the header, actually there we have a nav, but not a div just after the header like was searched here:
<xpath expr="//div[#id='wrapwrap']/header/div" position="after">
So I had to change it to:
<xpath expr="//div[#id='wrapwrap']/header/nav" position="after">
Cause there was a nav at that position. Didn't changing this was throwing a ParseError.
After change this it was working perfectly.
Hope this can be helpful for others
Wow, trying very similar thing with 12.0 Community, same result, anyone know what's going on? I'm using a tutorial making this change:
<template id="mystyle" name="My style" inherit_id="website.assets_frontend">
<xpath expr="link[last()]" position="after">
<link rel="stylesheet" type="text/scss" href="/theme folder/static/scss/style.scss"/>
</xpath>
</template>
You can install theme as module, not thrue Theme Installer module.
In Apps click Update Apps List and search your module, then install.
For that installation not need dependency website_theme_install
While trying to open one of contacts in odoo9 it crashes, throwing following error:
2018-07-12 19:28:04,856 14098 INFO grp-hhrr openerp.sql_db: Programming error: relation "account_invoice_report" does not exist
LÍNEA 3: FROM account_invoice_report account_invo...
^
, in query
SELECT SUM(price_total) as total, partner_id
FROM account_invoice_report account_invoice_report
WHERE (((("account_invoice_report"."partner_id" in (%s,%s)) AND (("account_invoice_report"."state" not in (%s,%s)) OR "account_invoice_report"."state" IS NULL)) AND ("account_invoice_report"."company_id" = %s)) AND ("account_invoice_report"."type" in (%s,%s)))
GROUP BY partner_id
2018-07-12 19:28:04,856 14098 ERROR grp-hhrr openerp.http: Exception during JSON request handling.
Traceback (most recent call last):
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/http.py", line 650, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/http.py", line 687, in dispatch
result = self._call_function(**self.params)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/http.py", line 323, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/service/model.py", line 118, in wrapper
return f(dbname, *args, **kwargs)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/http.py", line 316, in checked_call
result = self.endpoint(*a, **kw)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/http.py", line 966, in __call__
return self.method(*args, **kw)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/http.py", line 516, in response_wrap
response = f(*args, **kw)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/addons/web/controllers/main.py", line 895, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/addons/web/controllers/main.py", line 887, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/api.py", line 250, in wrapper
return old_api(self, *args, **kwargs)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/models.py", line 3208, in read
result = BaseModel.read(records, fields, load=load)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/api.py", line 248, in wrapper
return new_api(self, *args, **kwargs)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/models.py", line 3254, in read
values[name] = field.convert_to_read(record[name], use_name_get)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/models.py", line 5769, in __getitem__
return self._fields[key].__get__(self, type(self))
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/fields.py", line 831, in __get__
self.determine_value(record)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/fields.py", line 940, in determine_value
self.compute_value(recs)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/fields.py", line 895, in compute_value
self._compute_value(records)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/fields.py", line 885, in _compute_value
getattr(records, self.compute)()
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/api.py", line 248, in wrapper
return new_api(self, *args, **kwargs)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/addons/account/models/partner.py", line 322, in _invoice_total
self.env.cr.execute(query, where_clause_params)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/sql_db.py", line 154, in wrapper
return f(self, *args, **kwargs)
File "/home/administrador/Escritorio/GRP-HHRR/odoo9-GRP/openerp/sql_db.py", line 233, in execute
res = self._obj.execute(query, params)
ProgrammingError: relation "account_invoice_report" does not exist
LÍNEA 3: FROM account_invoice_report account_invo...
^
I've already tried to update the module several times, and all of it's dependencies. I've also tried unsuccessfully to locate the file throwing the error.
I have deleted my local git projects and pulled from master (which works), but error keeps going so it would seem it is a DataBase problem.
By deleting database and restoring a previous backup it all worked! So, please, do backup your db often.
I created a BIOM file, yyy.biom, using the functions make_biom and write_biom of the R package biomformat, version 1.2.0.
yyy.biom looks like:
"id":{},
"format":["Biological Observation Matrix 1.0.0-dev"],
"format_url":["http://biom-format.org/documentation/format_versions/biom-1.0.html"],
"type":["OTU table"],
"generated_by":["biomformat 1.2.0"],
"date":["2017-09-21 14:36:28"],
"matrix_type":["dense"],
"matrix_element_type":["int"],
"shape":[5,6],
"rows":[
{"id":["GG_OTU_1"],"metadata":["k__Bacteria","p__Proteobacteria","c__Gammaproteobacteria","o__Enterobacteriales","f__Enterobacteriaceae","g__Escherichia","s__"]},
{"id":["GG_OTU_2"],"metadata":["k__Bacteria","p__Cyanobacteria","c__Nostocophycideae","o__Nostocales","f__Nostocaceae","g__Dolichospermum","s__"]},
{"id":["GG_OTU_3"],"metadata":["k__Archaea","p__Euryarchaeota","c__Methanomicrobia","o__Methanosarcinales","f__Methanosarcinaceae","g__Methanosarcina","s__"]},
{"id":["GG_OTU_4"],"metadata":["k__Bacteria","p__Firmicutes","c__Clostridia","o__Halanaerobiales","f__Halanaerobiaceae","g__Halanaerobium","s__Halanaerobiumsaccharolyticum"]},
{"id":["GG_OTU_5"],"metadata":["k__Bacteria","p__Proteobacteria","c__Gammaproteobacteria","o__Enterobacteriales","f__Enterobacteriaceae","g__Escherichia","s__"]}
],
"columns":[
{"id":["Sample1"],"metadata":["CGCTTATCGAGA","CATGCTGCCTCCCGTAGGAGT","gut","human gut"]},
{"id":["Sample2"],"metadata":["CATACCAGTAGC","CATGCTGCCTCCCGTAGGAGT","gut","human gut"]},
{"id":["Sample3"],"metadata":["CTCTCTACCTGT","CATGCTGCCTCCCGTAGGAGT","gut","human gut"]},
{"id":["Sample4"],"metadata":["CTCTCGGCCTGT","CATGCTGCCTCCCGTAGGAGT","skin","human skin"]},
{"id":["Sample5"],"metadata":["CTCTCTACCAAT","CATGCTGCCTCCCGTAGGAGT","skin","human skin"]},
{"id":["Sample6"],"metadata":["CTAACTACCAAT","CATGCTGCCTCCCGTAGGAGT","skin","human skin"]}
],
"data": [[0,0,1,0,0,0],
[5,1,0,2,3,1],
[0,0,1,4,2,0],
[2,1,1,0,0,1],
[0,1,1,0,0,0]]
BIOM validation returns an error:
$ biom validate-table -i yyy.biom
Traceback (most recent call last):
File "/home/akense/programs/miniconda3/envs/qiime2.env.analysis/bin/biom", line 6, in <module>
sys.exit(biom.cli.cli())
File "/home/akense/programs/miniconda3/envs/qiime2.env.analysis/lib/python3.5/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/home/akense/programs/miniconda3/envs/qiime2.env.analysis/lib/python3.5/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/home/akense/programs/miniconda3/envs/qiime2.env.analysis/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/akense/programs/miniconda3/envs/qiime2.env.analysis/lib/python3.5/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/akense/programs/miniconda3/envs/qiime2.env.analysis/lib/python3.5/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/akense/programs/miniconda3/envs/qiime2.env.analysis/lib/python3.5/site-packages/biom_format-2.1.5-py3.5-linux-x86_64.egg/biom/cli/table_validator.py", line 49, in validate_table
valid, report = _validate_table(input_fp, format_version, detailed_report)
File "/home/akense/programs/miniconda3/envs/qiime2.env.analysis/lib/python3.5/site-packages/biom_format-2.1.5-py3.5-linux-x86_64.egg/biom/cli/table_validator.py", line 62, in _validate_table
detailed_report=detailed_report)
File "/home/akense/programs/miniconda3/envs/qiime2.env.analysis/lib/python3.5/site-packages/biom_format-2.1.5-py3.5-linux-x86_64.egg/biom/cli/table_validator.py", line 113, in __call__
detailed_report=detailed_report)
File "/home/akense/programs/miniconda3/envs/qiime2.env.analysis/lib/python3.5/site-packages/biom_format-2.1.5-py3.5-linux-x86_64.egg/biom/cli/table_validator.py", line 97, in run
return self._validate_json(**kwargs)
File "/home/akense/programs/miniconda3/envs/qiime2.env.analysis/lib/python3.5/site-packages/biom_format-2.1.5-py3.5-linux-x86_64.egg/biom/cli/table_validator.py", line 305, in _validate_json
status_msg = method(table_json)
File "/home/akense/programs/miniconda3/envs/qiime2.env.analysis/lib/python3.5/site-packages/biom_format-2.1.5-py3.5-linux-x86_64.egg/biom/cli/table_validator.py", line 496, in _valid_type
if value.lower() not in self.TableTypes:
AttributeError: 'list' object has no attribute 'lower'
I tried importing to QIIME 2 and got this error:
Traceback (most recent call last):
File "/home/akense/programs/miniconda3/envs/qiime2.env.analysis/bin/qiime", line 6, in <module>
sys.exit(q2cli.__main__.qiime())
File "/home/akense/programs/miniconda3/envs/qiime2.env.analysis/lib/python3.5/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/home/akense/programs/miniconda3/envs/qiime2.env.analysis/lib/python3.5/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/home/akense/programs/miniconda3/envs/qiime2.env.analysis/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/akense/programs/miniconda3/envs/qiime2.env.analysis/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/akense/programs/miniconda3/envs/qiime2.env.analysis/lib/python3.5/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/akense/programs/miniconda3/envs/qiime2.env.analysis/lib/python3.5/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/akense/programs/miniconda3/envs/qiime2.env.analysis/lib/python3.5/site-packages/q2cli/tools.py", line 111, in import_data
view_type=source_format)
File "/home/akense/programs/miniconda3/envs/qiime2.env.analysis/lib/python3.5/site-packages/qiime2/sdk/result.py", line 192, in import_data
return cls._from_view(type_, view, view_type, provenance_capture)
File "/home/akense/programs/miniconda3/envs/qiime2.env.analysis/lib/python3.5/site-packages/qiime2/sdk/result.py", line 217, in _from_view
result = transformation(view)
File "/home/akense/programs/miniconda3/envs/qiime2.env.analysis/lib/python3.5/site-packages/qiime2/core/transform.py", line 59, in transformation
new_view = transformer(view)
File "/home/akense/programs/miniconda3/envs/qiime2.env.analysis/lib/python3.5/site-packages/qiime2/core/transform.py", line 207, in wrapped
file_view = transformer(view)
File "/home/akense/programs/miniconda3/envs/qiime2.env.analysis/lib/python3.5/site-packages/q2_types/feature_table/_transformer.py", line 128, in _8
data = _parse_biom_table_v100(ff)
File "/home/akense/programs/miniconda3/envs/qiime2.env.analysis/lib/python3.5/site-packages/q2_types/feature_table/_transformer.py", line 46, in _parse_biom_table_v100
table = biom.Table.from_json(json.load(fh))
File "/home/akense/programs/miniconda3/envs/qiime2.env.analysis/lib/python3.5/site-packages/biom_format-2.1.5-py3.5-linux-x86_64.egg/biom/table.py", line 3672, in from_json
dtype = MATRIX_ELEMENT_TYPE[json_table['matrix_element_type']]
TypeError: unhashable type: 'list'
QIIME 2 support suggested that the format 1.0.0-dev might be causing the issue. Could that be it? If so is there a way to change format?
Thanks!