siemens / codeface

Codeface is a framework for analysing technical and social aspects of software development
siemens.github.io/codeface
GNU General Public License v2.0
67 stars 38 forks source link

(Bug) --recreate does not work #42

Open GeorgBerner opened 8 years ago

GeorgBerner commented 8 years ago

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'")

mitchell-joblin commented 8 years ago

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?