JRCSTU / CO2MPAS-TA

EU's Type-Approving vehicle simulator predicting NEDC CO2 emissions from WLTP
https://co2mpas.readthedocs.io/
European Union Public License 1.1
25 stars 13 forks source link

Dice error: gpg failed to sign the data error, key expired #25

Open zillazillo opened 6 years ago

zillazillo commented 6 years ago

hello, I have installed co2mpas, ran the demo 0 in TA mode in co2mpas. Afterwards I launch the console and start the dice process. Below is a copy of all entries from start to problem. First project init, the project append -i -o, then project report, and that is where I get the error.

(I have deleted co2mpas and reinstalled it, running 'install.vbs' each time before using co2mpas.)

Could somebody help with the issue I have? Thanks in advance!

D:\homologation\co2mpas_AIO-1.7.3\CO2MPAS>co2dice project ls --GpgSpec.allow_test_key=True
12:13:36       : INFO:co2mpas.sampling.project.LsCmd:Listing all projects...
* IP-10-AAA-2017-0000: empty

D:\homologation\co2mpas_AIO-1.7.3\CO2MPAS>co2dice project init IP-10-AAA-2017-0000 --GpgSpec.allow_test_key=True
12:14:17       : INFO:traitlets:Creating project 'IP-10-AAA-2017-0000'...
12:14:19       :ERROR:co2dice:Project 'IP-10-AAA-2017-0000' already exists!

D:\homologation\co2mpas_AIO-1.7.3\CO2MPAS>co2dice project append -i D:\homologation\co2mpas_AIO-1.7.3\CO2MPAS\input\demo0.xlsx -o D:\homologation\co2mpas_AIO-1.7.3\CO2MPAS\output\20180402_120916-demo0.xlsx --GpgSpec.allow_test_key=True
12:15:24       : INFO:co2mpas.sampling.project.AppendCmd:Importing report files...
  PFiles(inp=['D:\\homologation\\co2mpas_AIO-1.7.3\\CO2MPAS\\input\\demo0.xlsx'], out=['D:\\homologation\\co2mpas_AIO-1.7.3\\CO2MPAS\\output\\20180402_120916-demo0.xlsx'], other=())
12:15:26       : INFO:transitions.core:IP-10-AAA-2017-0000: Exited state empty
12:15:26       : INFO:co2mpas.sampling.project.Project:Importing files: PFiles(inp=['D:\\homologation\\co2mpas_AIO-1.7.3\\CO2MPAS\\input\\demo0.xlsx'], out=['D:\\homologation\\co2mpas_AIO-1.7.3\\CO2MPAS\\output\\20180402_120916-demo0.xlsx'], other=())...
12:15:32       : INFO:transitions.core:IP-10-AAA-2017-0000: Entered state wltp_iof
12:15:33       : INFO:co2mpas.sampling.project.Project:Committing Project(IP-10-AAA-2017-0000: wltp_iof): add 2 files
true
...

D:\homologation\co2mpas_AIO-1.7.3\CO2MPAS>co2dice project report --GpgSpec.allow_test_key=True
12:15:48       : INFO:co2mpas.sampling.project.ReportCmd:Tagging project ()...
12:15:50       : INFO:transitions.core:IP-10-AAA-2017-0000: Exited state wltp_iof
12:15:50       : INFO:co2mpas.sampling.project.Project:Preparing  report: {}...
12:15:56       : INFO:transitions.core:IP-10-AAA-2017-0000: Entered state tagged
12:15:56       : INFO:co2mpas.sampling.project.Project:Committing Project(IP-10-AAA-2017-0000: tagged): drep 2 files
12:15:56       : INFO:co2mpas.sampling.project.Project:Tagging Project(IP-10-AAA-2017-0000: tagged): dices/IP-10-AAA-2017-0000/0
12:15:57       :WARNI:co2mpas.sampling.project.Project:New status('tagged') failed, REVERTING to prev-status('wltp_iof').
12:15:57       :CRITI:co2dice:Cmd('git') failed due to: exit code(128)
  cmdline: git tag --local-user=CBBB52FF -m - {v: 1.0.2, a: drep 2 files, p: IP-10-AAA-2017-0000, s: tagged}

- file: demo0.xlsx
  iokind: inp
  report: {vehicle_family_id: IP-10-AAA-2017-0000}
- file: 20180402_120916-demo0.xlsx
  iokind: out
  report:
    0.vehicle_family_id: [IP-10-AAA-2017-0000, IP-10-AAA-2017-0000]
    1.CO2MPAS_version: [1.7.3, 1.7.3]
    2.report_type: [dice_report, dice_report]
    3.datetime: ['2018/04/02-12:09:36', '2018/04/02-12:09:36']
    4.TA_mode: ['True', 'True']
    5.CO2MPAS_deviation: [-0.239, .nan]
    6.Vehicle: [.nan, .nan]
    7.fuel_type: [diesel, diesel]
    8.engine_capacity: [1911.0, 1911.0]
    9.gear_box_type: [manual, manual]
    10.engine_is_turbo: [1.0, 1.0]
    11.Model_scores WLTP-H: [.nan, .nan]
    12.alternator_model (battery currents): [3.7073, .nan]
    13.alternator_model (alternator currents): [3.7814, .nan]
    14.at_model: [.nan, .nan]
    15.clutch_torque_converter_model: [0.1081, .nan]
    16.co2_params: [0.004, .nan]
    17.engine_cold_start_speed_model: [0.0298, .nan]
    18.engine_coolant_temperature_model: [0.7078, .nan]
    19.engine_speed_model: [0.0, 87.1179]
    20.start_stop_model (engine starts): [-1.0, .nan]
    21.start_stop_model (on engine): [-1.0, .nan]
    22.Model_scores WLTP-L: [.nan, .nan]
    23.alternator_model (battery currents): [.nan, .nan]
    24.alternator_model (alternator currents): [.nan, .nan]
    25.at_model: [.nan, .nan]
    26.clutch_torque_converter_model: [.nan, .nan]
    27.co2_params: [.nan, .nan]
    28.engine_cold_start_speed_model: [.nan, .nan]
    29.engine_coolant_temperature_model: [.nan, .nan]
    30.engine_speed_model: [.nan, .nan]
    31.start_stop_model (engine starts): [.nan, .nan]
    32.start_stop_model (on engine): [.nan, .nan]
 --sign dices/IP-10-AAA-2017-0000/0 HEAD
  stderr: 'error: gpg failed to sign the data
error: unable to sign the tag'
Traceback (most recent call last):
  File "D:\homologation\co2mpas_AIO-1.7.3\Apps\WinPython\python-3.6.1.amd64\lib\site-packages\co2mpas\sampling\dice.py", line 198, in main
    return baseapp.pump_cmd(cmd.start()) and 0
  File "D:\homologation\co2mpas_AIO-1.7.3\Apps\WinPython\python-3.6.1.amd64\lib\site-packages\co2mpas\sampling\baseapp.py", line 1448, in pump_cmd
    for i in cmd_res:
  File "D:\homologation\co2mpas_AIO-1.7.3\Apps\WinPython\python-3.6.1.amd64\lib\site-packages\co2mpas\sampling\project.py", line 1869, in run
    ok = proj.do_report()
  File "D:\homologation\co2mpas_AIO-1.7.3\Apps\WinPython\python-3.6.1.amd64\lib\site-packages\transitions\core.py", line 282, in trigger
    return self.machine._process(f)
  File "D:\homologation\co2mpas_AIO-1.7.3\Apps\WinPython\python-3.6.1.amd64\lib\site-packages\transitions\core.py", line 831, in _process
    return trigger()
  File "D:\homologation\co2mpas_AIO-1.7.3\Apps\WinPython\python-3.6.1.amd64\lib\site-packages\transitions\core.py", line 312, in _trigger
    if t.execute(event_data):
  File "D:\homologation\co2mpas_AIO-1.7.3\Apps\WinPython\python-3.6.1.amd64\lib\site-packages\transitions\core.py", line 201, in execute
    machine._callback(func, event_data)
  File "D:\homologation\co2mpas_AIO-1.7.3\Apps\WinPython\python-3.6.1.amd64\lib\site-packages\transitions\core.py", line 812, in _callback
    func(event_data)
  File "D:\homologation\co2mpas_AIO-1.7.3\Apps\WinPython\python-3.6.1.amd64\lib\site-packages\co2mpas\sampling\project.py", line 560, in _cb_commit_or_tag
    local_user=git_auth.master_key_resolved)
  File "D:\homologation\co2mpas_AIO-1.7.3\Apps\WinPython\python-3.6.1.amd64\lib\site-packages\git\repo\base.py", line 355, in create_tag
    return TagReference.create(self, path, ref, message, force, **kwargs)
  File "D:\homologation\co2mpas_AIO-1.7.3\Apps\WinPython\python-3.6.1.amd64\lib\site-packages\git\refs\tag.py", line 83, in create
    repo.git.tag(*args, **kwargs)
  File "D:\homologation\co2mpas_AIO-1.7.3\Apps\WinPython\python-3.6.1.amd64\lib\site-packages\git\cmd.py", line 425, in <lambda>
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
  File "D:\homologation\co2mpas_AIO-1.7.3\Apps\WinPython\python-3.6.1.amd64\lib\site-packages\git\cmd.py", line 877, in _call_process
    return self.execute(call, **exec_kwargs)
  File "D:\homologation\co2mpas_AIO-1.7.3\Apps\WinPython\python-3.6.1.amd64\lib\site-packages\git\cmd.py", line 688, in execute
    raise GitCommandError(command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
  cmdline: git tag --local-user=CBBB52FF -m - {v: 1.0.2, a: drep 2 files, p: IP-10-AAA-2017-0000, s: tagged}

- file: demo0.xlsx
  iokind: inp
  report: {vehicle_family_id: IP-10-AAA-2017-0000}
- file: 20180402_120916-demo0.xlsx
  iokind: out
  report:
    0.vehicle_family_id: [IP-10-AAA-2017-0000, IP-10-AAA-2017-0000]
    1.CO2MPAS_version: [1.7.3, 1.7.3]
    2.report_type: [dice_report, dice_report]
    3.datetime: ['2018/04/02-12:09:36', '2018/04/02-12:09:36']
    4.TA_mode: ['True', 'True']
    5.CO2MPAS_deviation: [-0.239, .nan]
    6.Vehicle: [.nan, .nan]
    7.fuel_type: [diesel, diesel]
    8.engine_capacity: [1911.0, 1911.0]
    9.gear_box_type: [manual, manual]
    10.engine_is_turbo: [1.0, 1.0]
    11.Model_scores WLTP-H: [.nan, .nan]
    12.alternator_model (battery currents): [3.7073, .nan]
    13.alternator_model (alternator currents): [3.7814, .nan]
    14.at_model: [.nan, .nan]
    15.clutch_torque_converter_model: [0.1081, .nan]
    16.co2_params: [0.004, .nan]
    17.engine_cold_start_speed_model: [0.0298, .nan]
    18.engine_coolant_temperature_model: [0.7078, .nan]
    19.engine_speed_model: [0.0, 87.1179]
    20.start_stop_model (engine starts): [-1.0, .nan]
    21.start_stop_model (on engine): [-1.0, .nan]
    22.Model_scores WLTP-L: [.nan, .nan]
    23.alternator_model (battery currents): [.nan, .nan]
    24.alternator_model (alternator currents): [.nan, .nan]
    25.at_model: [.nan, .nan]
    26.clutch_torque_converter_model: [.nan, .nan]
    27.co2_params: [.nan, .nan]
    28.engine_cold_start_speed_model: [.nan, .nan]
    29.engine_coolant_temperature_model: [.nan, .nan]
    30.engine_speed_model: [.nan, .nan]
    31.start_stop_model (engine starts): [.nan, .nan]
    32.start_stop_model (on engine): [.nan, .nan]
 --sign dices/IP-10-AAA-2017-0000/0 HEAD
  stderr: 'error: gpg failed to sign the data
error: unable to sign the tag'
dimitriskomnos commented 6 years ago

Dear @zillazillo,

Thank you for using the Github platform for reporting your errors. This might help other users that have the same problem.

To start with, I edited a bit your comment above, (just putting before and after 3 back ticks (```)) so the commands and their output have the same format, as seen in your console.

The error you basically get is in the: co2dice project report command.
The problem must originate to the test key, which it should have been expired. To check this, type the following in your console: (This command outputs the list with the public keys inside your AIO)

gpg -k

The output should be similar to the below:

[...]
-----------------------------------------------------
pub   1024R/CBBB52FF 2017-01-26 [expired: YYYY-MM-DD]
uid       [ expired] CO2MPAS Test <JRC-CO2MPAS@ec.europa.eu>
[...]

In case you see a similar output ([expired: YYYY-MM-DD]), please copy the folowing and paste ([Shift]+[Insert])in the console:

printf 'expire\n6m\nsave\n' | gpg2  --batch --yes --command-fd 0 --status-fd 2 --edit-key 5464E04EE547D1FEDCAC4342B124C999CBBB52FF

which will extend the validity of your test key for a 6 month period. (to adjust the period of the validity, you need to adjust the part: 'expire\n6m\nsave\n'. For example: \n6m\: is 6 months, \n1y\: is 1 year).

Let us know if you manage to solve your problem and proceed.

Kind regards.

zillazillo commented 6 years ago

thank you very much for your quick response (and editing my post) your advise has worked and I have been able to 'tag' my report thanks again!