Import from mantis error
Hi,
I’m trying to import bugs from mantis and facing this error:
Creating custom fields definitions
Processing custom field with name [ priority ]
Processing custom field with name [ severity ]
Processing custom field with name [ category_id ]
Processing custom field with name [ version ]
Processing custom field with name [ fixed_in_version ]
Processing custom field with name [ build ]
Processing custom field with name [ platform ]
Processing custom field with name [ os ]
Processing custom field with name [ os_build ]
Processing custom field with name [ due_date ]
Processing custom field with name [ Reproducibility ]
Processing custom field with name [ target_version ]
Processing custom field with name [ status ]
Processing custom field with name [ resolution ]
Processing custom field with name [ project_id ]
Creating custom fields definitions finished
Creating project [ 62 ] with name [ Licensing ]
Importing components to project [ 62 ]
Value with name [ NA ] already exists in bundle [ Subsystem_bundle ]
Value with name [ none ] already exists in bundle [ Subsystem_bundle ]
Importing components to project [ 62 ] finished
Importing versions to project [ 62 ]
Importing versions to project [ 62 ] finished
Attaching custom fields to project [ 62 ]
Attaching custom fields to project [ 62 ] finished
Importing issues to project [ 62 ]
Traceback (most recent call last):
File "D:\[PythonWorkspace]\testProject\mantis2youtrack.py", line 453, in <module>
main()
File "D:\[PythonWorkspace]\testProject\mantis2youtrack.py", line 19, in main
mantis_port, mantis_login, mantis_pass, mantis_product_names)
File "D:\[PythonWorkspace]\testProject\mantis2youtrack.py", line 422, in mantis2youtrack
[to_yt_issue(issue, project_id, target) for issue in mantis_issues])
File "D:\[PythonWorkspace]\testProject\mantis2youtrack.py", line 164, in to_yt_issue
add_value_to_field(field_name, field_type, value, project_id, target)
File "D:\[PythonWorkspace]\testProject\mantis2youtrack.py", line 136, in add_value_to_field
target.addValueToBundle(bundle, value)
File "D:\[PythonWorkspace]\testProject\youtrack\connection.py", line 791, in addValueToBundle
request += urllib.quote(value.name.encode('utf-8'), safe="") + "?"
AttributeError: 'long' object has no attribute 'name'
I’ve the latest mantis (1.2.14), unchanged defaultMantis.py and python 2.7.2. All other libs are also up to date.
I’m trying to import bugs from mantis and facing this error:
Creating custom fields definitions
Processing custom field with name [ priority ]
Processing custom field with name [ severity ]
Processing custom field with name [ category_id ]
Processing custom field with name [ version ]
Processing custom field with name [ fixed_in_version ]
Processing custom field with name [ build ]
Processing custom field with name [ platform ]
Processing custom field with name [ os ]
Processing custom field with name [ os_build ]
Processing custom field with name [ due_date ]
Processing custom field with name [ Reproducibility ]
Processing custom field with name [ target_version ]
Processing custom field with name [ status ]
Processing custom field with name [ resolution ]
Processing custom field with name [ project_id ]
Creating custom fields definitions finished
Creating project [ 62 ] with name [ Licensing ]
Importing components to project [ 62 ]
Value with name [ NA ] already exists in bundle [ Subsystem_bundle ]
Value with name [ none ] already exists in bundle [ Subsystem_bundle ]
Importing components to project [ 62 ] finished
Importing versions to project [ 62 ]
Importing versions to project [ 62 ] finished
Attaching custom fields to project [ 62 ]
Attaching custom fields to project [ 62 ] finished
Importing issues to project [ 62 ]
Traceback (most recent call last):
File "D:\[PythonWorkspace]\testProject\mantis2youtrack.py", line 453, in <module>
main()
File "D:\[PythonWorkspace]\testProject\mantis2youtrack.py", line 19, in main
mantis_port, mantis_login, mantis_pass, mantis_product_names)
File "D:\[PythonWorkspace]\testProject\mantis2youtrack.py", line 422, in mantis2youtrack
[to_yt_issue(issue, project_id, target) for issue in mantis_issues])
File "D:\[PythonWorkspace]\testProject\mantis2youtrack.py", line 164, in to_yt_issue
add_value_to_field(field_name, field_type, value, project_id, target)
File "D:\[PythonWorkspace]\testProject\mantis2youtrack.py", line 136, in add_value_to_field
target.addValueToBundle(bundle, value)
File "D:\[PythonWorkspace]\testProject\youtrack\connection.py", line 791, in addValueToBundle
request += urllib.quote(value.name.encode('utf-8'), safe="") + "?"
AttributeError: 'long' object has no attribute 'name'
I’ve the latest mantis (1.2.14), unchanged defaultMantis.py and python 2.7.2. All other libs are also up to date.
Please sign in to leave a comment.
Could you please execute following query in mysql:
'mantis_bug_table', 'CREATE TABLE `mantis_bug_table` (\n `id` int(7) unsigned NOT NULL AUTO_INCREMENT,\n `project_id` int(7) unsigned NOT NULL DEFAULT \'0\',\n `reporter_id` int(7) unsigned NOT NULL DEFAULT \'0\',\n `handler_id` int(7) unsigned NOT NULL DEFAULT \'0\',\n `duplicate_id` int(7) unsigned NOT NULL DEFAULT \'0\',\n `priority` int(2) NOT NULL DEFAULT \'30\',\n `severity` int(2) NOT NULL DEFAULT \'50\',\n `reproducibility` int(2) NOT NULL DEFAULT \'10\',\n `status` int(2) NOT NULL DEFAULT \'10\',\n `resolution` int(2) NOT NULL DEFAULT \'10\',\n `projection` int(2) NOT NULL DEFAULT \'10\',\n `eta` int(2) NOT NULL DEFAULT \'10\',\n `bug_text_id` int(7) unsigned NOT NULL DEFAULT \'0\',\n `os` varchar(32) NOT NULL DEFAULT \'\',\n `os_build` varchar(32) NOT NULL DEFAULT \'\',\n `platform` varchar(32) NOT NULL DEFAULT \'\',\n `version` varchar(64) NOT NULL DEFAULT \'\',\n `fixed_in_version` varchar(64) NOT NULL DEFAULT \'\',\n `build` varchar(32) NOT NULL DEFAULT \'\',\n `profile_id` int(7) unsigned NOT NULL DEFAULT \'0\',\n `view_state` int(2) NOT NULL DEFAULT \'10\',\n `summary` varchar(128) NOT NULL DEFAULT \'\',\n `sponsorship_total` int(7) NOT NULL DEFAULT \'0\',\n `sticky` tinyint(1) NOT NULL DEFAULT \'0\',\n `target_version` varchar(64) NOT NULL DEFAULT \'\',\n `category_id` int(10) unsigned NOT NULL DEFAULT \'1\',\n `date_submitted` int(10) unsigned NOT NULL DEFAULT \'1\',\n `due_date` int(10) unsigned NOT NULL DEFAULT \'1\',\n `last_updated` int(10) unsigned NOT NULL DEFAULT \'1\',\n PRIMARY KEY (`id`),\n KEY `sponsorship_total` (`sponsorship_total`),\n KEY `fixed_in_version` (`fixed_in_version`),\n KEY `status` (`status`),\n KEY `project_id` (`project_id`)\n) ENGINE=MyISAM AUTO_INCREMENT=17386 DEFAULT CHARSET=utf8'
Sorry for the so long delay.
I've fixed this problem. Please, download the latest library version and try again.
Working fine now!