codeface icon indicating copy to clipboard operation
codeface copied to clipboard

(Bug) --recreate does not work

Open GeorgBerner opened this issue 9 years ago • 1 comments

when trying to run an analysis again using the --recreate parameter the project is not deleted in the database and the analysis run fails.

Traceback (most recent call last): File "/usr/local/bin/codeface", line 9, in load_entry_point('codeface', 'console_scripts', 'codeface')() File "/vagrant/codeface/cli.py", line 202, in main return run(sys.argv) File "/vagrant/codeface/cli.py", line 198, in run return args.func(args) File "/vagrant/codeface/cli.py", line 117, in cmd_run args.profile_r, args.jobs, args.tagging, args.reuse_db) File "/vagrant/codeface/project.py", line 93, in project_analyse project_id, dbm, all_range_ids = project_setup(conf, recreate) File "/vagrant/codeface/project.py", line 44, in project_setup recreate_project=recreate) File "/vagrant/codeface/dbmanager.py", line 227, in update_release_timeline pid = self.getProjectID(project, tagging) File "/vagrant/codeface/dbmanager.py", line 115, in getProjectID "VALUES (%s, %s);", (name, analysisMethod)) File "/vagrant/codeface/dbmanager.py", line 98, in doExecCommit self.doExec(stmt, args) File "/vagrant/codeface/dbmanager.py", line 77, in doExec res = self.cur.execute(stmt, args) File "build/bdist.linux-x86_64/egg/MySQLdb/cursors.py", line 205, in execute File "build/bdist.linux-x86_64/egg/MySQLdb/connections.py", line 36, in defaulterrorhandler _mysql_exceptions.IntegrityError: (1062, "Duplicate entry 'lazer' for key 'name_UNIQUE'")

GeorgBerner avatar Mar 04 '16 13:03 GeorgBerner

This error can occur when you change the configuration file for the project (e.g., the tag option) without changing the project name. At the point we are only able to associate a single tag option with a single project name. Can you please try to change the project name in the configuration file (e.g., lazer_2) and see if it works?

mitchell-joblin avatar Mar 04 '16 13:03 mitchell-joblin