Open nunorosa9 opened 1 year ago
hi,
When importing the export into another metabase I am getting the following error. Can you help?
C:\_dev\metabase_export_import>python metabase_import.py http://192.168.1.152:3002/api/ xxxxxx@gmail.com xxxxx123 Nuno c:\temp\1 Traceback (most recent call last): File "C:\_dev\metabase_export_import\metabase_import.py", line 15, in <module> ametabase.import_cards_from_json(metabase_base, metabase_exportdir) File "C:\_dev\metabase_export_import\metabase.py", line 715, in import_cards_from_json res.append(self.card_import(database_name, self.convert_names2ids(database_name, collection_name, card))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\_dev\metabase_export_import\metabase.py", line 483, in convert_names2ids [new_k, value] = self.convert_pcnames2id(database_name, collection_name, k, obj[k]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\_dev\metabase_export_import\metabase.py", line 436, in convert_pcnames2id return [new_k, self.collection_name2id_or_create_it(collection_name)] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\_dev\metabase_export_import\metabase.py", line 403, in collection_name2id_or_create_it self.create_collection(collection_name) File "C:\_dev\metabase_export_import\metabase.py", line 421, in create_collection return self.query('POST', 'collection', param) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\_dev\metabase_export_import\metabase.py", line 74, in query raise ConnectionError(query_response) ConnectionError: {'errors': {'name': 'value must be a non-blank string.'}}
You can add a collection name parameter in the calls in metabase_import.py
metabase_import.py
hi,
When importing the export into another metabase I am getting the following error. Can you help?
C:\_dev\metabase_export_import>python metabase_import.py http://192.168.1.152:3002/api/ xxxxxx@gmail.com xxxxx123 Nuno c:\temp\1 Traceback (most recent call last): File "C:\_dev\metabase_export_import\metabase_import.py", line 15, in <module> ametabase.import_cards_from_json(metabase_base, metabase_exportdir) File "C:\_dev\metabase_export_import\metabase.py", line 715, in import_cards_from_json res.append(self.card_import(database_name, self.convert_names2ids(database_name, collection_name, card))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\_dev\metabase_export_import\metabase.py", line 483, in convert_names2ids [new_k, value] = self.convert_pcnames2id(database_name, collection_name, k, obj[k]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\_dev\metabase_export_import\metabase.py", line 436, in convert_pcnames2id return [new_k, self.collection_name2id_or_create_it(collection_name)] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\_dev\metabase_export_import\metabase.py", line 403, in collection_name2id_or_create_it self.create_collection(collection_name) File "C:\_dev\metabase_export_import\metabase.py", line 421, in create_collection return self.query('POST', 'collection', param) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\_dev\metabase_export_import\metabase.py", line 74, in query raise ConnectionError(query_response) ConnectionError: {'errors': {'name': 'value must be a non-blank string.'}}