Open Piluri opened 7 years ago
Dear Piluri, the following line in the logs means that project init
command failed:
17:54:08 :ERROR:co2dice:Project 'IP-10-AAA-2017-1002' already exists!
It's ok, because you have already created this project, and both input & out files have been imported into it, since it is in the wltp_i(nput)o(utput)
state, as seen in the next ls
command you pasted.
What you should do next is the following:
Check the imported files in the project are what they should.
Assuming your are in your "HOME" folder CO2MPAS, type these commands to create copies of the imported files in a new testdir
folder and launch Excel to inspect them (we do not want to inspect and modify the originals):
mkdir testdir
cp .co2dice/repo/inp/* .co2dice/repo/out/* testdir
start testdit/*
If they are ok, proceed the project to report
state:
co2dice project report
Send the dice-email (assuming your configurations are properly setup with your email-server):
co2dice project tsend
Tip: if a command fails, relaunch it with the -v
flag and paste the results here.
Correction: In step 1, wherever you see the asterisk(*
), you have to press [Tab]
key, to complete the name of the file that is located in this folder.
Otherwise you have to do the "copy" and "open" action with file-explorer.
Thank you for the Response,
I checked the Input and Output files and they are ok. No abnormalities! I still can’t initialize a Project.
This is what I did:
co2mpas_version: 1.5.7.b3 co2mpas_rel_date: 2017-05-14 08:16:03
co2mpas_path: C:\Users\G00550\Documents\co2mpas_AIO-v1.5.5\Apps\WinPython\python-3.5.2.amd64\lib\site-packages\co2mpas python_version: 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)]
C:\Users\G00550\Documents\co2mpas_AIO-v1.5.5\CO2MPAS>co2dice project init -i C:\Users\G00550\Documents\co2mpas_AIO-v1.5.5\ Input\co2mpas_input _Test1_R401_0016011_Test1.xlsx -o C:\Users\G00550\Documents\co2mpas_AIO-v1.5.5\ Output\20170629_120810-co2mpas_input xlsx --report –v
This is the answer:
12:24:24 : INFO:InitCmd:Project 'IP-XX-YYY-2017-XXXX' derived from 'inp' file: C:\Users\G00550\Documents\co2mpas_AIO-v1.5.5\ Input\co2mpas_in.xlsx 12:24:24 : INFO:traitlets:Creating project 'IP-XX-YYY-2017-XXXX'... 12:24:25 : INFO:traitlets:...failed opening repo 'C:\Users\G00550\Documents\co2mpas_AIO-v1.5.5\CO2MPAS.co2dice\repo', initializing a new repo 'C:\Users\G00550\Documents\co2mpas_AIO-v1.5.5\CO2MPAS\.co2dice\repo' instead... gpg2 --status-fd 2 --no-tty --debug ipc --use-agent --allow-weak-digest-algos --armor --keyid-format long --version gpg: Hinweis: Keine voreingestellte Optionendatei 'C:/Users/G00550/Documents/co2mpas_AIO-v1.5.5/Apps/GnuPG/home/gpg.conf' vorhanden gpg2 --status-fd 2 --no-tty --debug ipc --use-agent --allow-weak-digest-algos --armor --keyid-format long --list-secret-keys --fixed-list-mode --fingerprint --with-colons gpg: Hinweis: Keine voreingestellte Optionendatei 'C:/Users/G00550/Documents/co2mpas_AIO-v1.5.5/Apps/GnuPG/home/gpg.conf' vorhanden
sec::1024:1:B124C999CBBB52FF:1485434541:1500986541:::::::::
fpr:::::::::5464E04EE547D1FEDCAC4342B124C999CBBB52FF:
uid:::::::F3C8DBC15DD5EB340D03F3FD5F0F79753115FACD::CO2MPAS Test sampling@co2mpas.jrc.ec.europa.eu:
12:24:25 :WARNI:traitlets:Overwritten 8 out of 8 missmatched value in git-settings('C:\Users\G00550\Documents\co2mpas_AIO-v1.5.5\CO2MPAS.co2dice\repo\
:
core.filemode: [true, false,
Note: 'C:/Users/G00550/Documents/co2mpas_AIO-v1.5.5/Apps/GnuPG/home/gpg.conf' - gpg.conf - is missing tells the DICE. Thank you!
Dear Mr Piluri,
In your message log, we see this:
12:24:47.283843 run-command.c:336 trace: run_command: '/cygdrive/c/Users/G00550/Documents/co2mpas_AIO-v1.5.5/Apps/GnuPG/pub/gpg2.EXE' '-bsau' 'None'
gpg: skipped "None": No secret key
gpg: signing failed: No secret key
error: gpg failed to sign the data
error: unable to sign the tag'
This message pops up because you do not have added the master_key in your configuration file.
Please, add the following in your _co2diceconfig.py file:
## The key-id (or recipient) of a *secret* PGP key to use for various crytpo
# operations.
# For CO2MPAS testing-period (till ~July 2017) leave it as it is.
c.GpgSpec.master_key = 'CBBB52FF'
(This key is for the purposes of testing. )
In order to produce the report
you need the master_key, but not before.
Since you have already appended the files input and output ,
and you received the message:
IP-XX-YYY-2017-XXXX: wltp_iof
Continue with the workflow, starting with:
co2dice project report
Let us know if you still face problems with the DICE.
Regards, Dimitris
Hello Dimitris,
Thank you for your help, you are right the master key was missing. Now after adding it every thing was fine.
Now I have a problem with:
$ co2dice project tparse. Copy from the above log message (from -----BEGIN PGP SIGNED MESSAGE----- to the end) and paste it in the console by pressing [Shift+INSERT], and send the end-stream character after a new-line, 4 that is to say: press [Enter], [Ctrl+Z], [Enter], in a row.
This is what I receive:
-----END PGP SIGNATURE----- ^Z 15:13:00 :ERROR:co2dice:Cannot verify timestamp-response's signature due to: signature bad
Dear Mr Piluri,
If I am correct, we received the time stamp response, too, since you, correctly, added us in c.TstampSender.tstamp_recipients
of your configuration file.
We managed to parse the signature and get the SAMPLE/NO SAMPLE decision. If you sent the report through the yahoo public e-mail provider , please try the following:
Open the e-mail that you received from the time stamp server. Find the option to see the raw message. Maybe the picture bellow helps:
Copy the message from there and paste it, as you did before.
This procedure should work. Let us know if everything is fine and if you managed to get the decision.
Regards, Dimitris.
Thank you!!! Every Thing works fine now.
Thank you for your Support.
Hello Everybody, The last point of the DICE instructions is: Co2dice project export ….. What is included in this .zip file? I have uploaded my export file as example and I was asking myself why there are not any Input or output files. Is it ok so?
The files are indeed included in the zip archive.
The zip archive is actually a "bare" git repository, so the files are all stored "encoded" under the repo/.objects
dirs. You can "checkout" and view them using git
commands.
In practice, exploring the contents of the archive is not required by the legislation, and they are send to the TAA for tracing the procedure in case of future problems. But for completeness, I present a console session with the git commands that checkout the contents (assuming your archive is located in your CO2MPAS home dir):
> mkdir project_testdir
> cd project_testdir
> unzip CO2MPAS_projects-20170630-175833.zip
Archive: /d/Downloads/CO2MPAS_projects-20170630-175833.zip
creating: repo/
...: ...
inflating: repo/refs/tags/dices/IP-10-AAA-2017-1002/0
> mv repo .git
> git config core.bare false
> git branch
projects/IP-10-AAA-2017-1002
> git checkout projects/IP-10-AAA-2017-1002
Switched to branch 'projects/IP-10-AAA-2017-1002'
> ls inp out
inp:
co2mpas_demo-1.xlsx
out:
20170630_173257-co2mpas_demo-1.xlsx
> start inp/co2mpas_demo-1.xlsx
> start out/20170630_173257-co2mpas_demo-1.xlsx
The last 2 commands open the co2mpas input/output files in Excel.
I was looking in .zip file the DICE decision (dice hexnum and the random number in percent). Is it possible to export this decision from DICE? Not only with copy-paste.
I'm not sure I understand your question?
But for sure you can view the "full" decision for projects with --verbose
,
for instance:
> co2dice ls -v
IP-10-AAA-2017-1009:
msg.s: nosample
msg.a: diced as OK
last_dice: 'dices/IP-10-AAA-2017-1009/0: 2bc0977ba7f2ead4e9abfc4e0ab800984cf6dc6b'
last_commit: a6c59130172b5b04ce61bb023361fe6c004ede05
last_tree: b41487f0feba935e3d00908b4f3c3b935f6bf59e
files:
- CO2MPAS
- tstamp.txt
- inp/co2mpas_demo-8.xlsx
- out/20170302_141422-co2mpas_demo-8.xlsx
dices:
- 'dices/IP-10-AAA-2017-1009/0: 2bc0977ba7f2ead4e9abfc4e0ab800984cf6dc6b'
dices_count: 1
revs_count: 4
files_count: 4
last_cdate: '2017-06-23 15:01:59+02:00'
author: Dimitrios Komnos <dimitris.komnos@outlook.com>
is_current: false
RL-99-BM3-2017-0001:
msg.s: wltp_iof
msg.a: imp 3 files
last_dice: null
last_commit: 6e5d63300b011c5aee68cc82072b19d201fd249b
last_tree: 4a6ed28a981348c9281627edf619d982be10aa43
files:
- CO2MPAS
- inp/input.xlsx
- other/LICENSE.txt
- out/output.xlsx
dices: []
dices_count: 0
revs_count: 1
files_count: 4
last_cdate: '2017-02-06 19:00:36+00:00'
author: Kostis Anagnostopoulos <ankostis@gmail.com>
is_current: true
Is that what you asked?
My question is, is it possible to export the dicision:
0967354.a@stamper.itconsult.co.uk: To: company@mail.com Subject: 'Proof of Posting Certificate 0967354:[co2dice.test]: dices/IP-10-AAA-2017-1002/0' Date: Fri, 30 Jun 2017 16:55:05 +0100 project: IP-10-AAA-2017-1002 dice: decision: OK hexnum: ADD1BCE040765BA582701FA622CF99AD82191AE0 percent: 88
TAA need this confirmation.
A message formatted like your example is not stored anywhere, per se, because you combined 2 disparate elements: the tstamped email-response + the decision.
The tstamped reply email does not contain the decision - just the tstamper's (random) signature, as explained in this diagram:
It is co2dice
application that parses that signature and derives the decision, which is then stored in the internal git repo. The following image depicts the whole timestamping procedure:
You may read any old decisions with the commands shown in my previous comment. Since those decisions contain also the cryptographic hashes, they can be sent as a proof (I've updated the console printout with a sampled project for you to see).
Finally, a programmer, or someone comfortable with git
commands can retrieve the actual parsed response emails and other artifacts (inp, out, or other files).
For the rest, "opening" the project and visiting .co2dice/repo
folder is a viable solution, as long as the user is careful not modify these files.
Do the above answer your questions? In any case, if you have some specific use case in mind, we would happily discuss it.
Hello, I was trying to use co2dice and this Problem popped up:
C:\Users\G00550\Documents\CO2MPAS\co2mpas\co2mpas_AIO-v1.5.5\Demos>co2dice project init -i Input\co2mpas_demo-1.xlsx -o Output\20170628_172801-co2mpas_demo-1.xlsx --report 17:54:08 : INFO:InitCmd:Project 'IP-10-AAA-2017-1002' derived from 'inp' file: C:\Users\G00550\Documents\CO2MPAS\co2mpas\co2mpas_AIO-v1.5.5\Demos\Input\co2mpas_demo-1.xlsx 17:54:08 : INFO:traitlets:Creating project 'IP-10-AAA-2017-1002'... 17:54:08 :ERROR:co2dice:Project 'IP-10-AAA-2017-1002' already exists!
C:\Users\G00550\Documents\CO2MPAS\co2mpas\co2mpas_AIO-v1.5.5\Demos>co2dice project ls 17:54:44 : INFO:LsCmd:Listing all projects...
C:\Users\G00550\Documents\CO2MPAS\co2mpas\co2mpas_AIO-v1.5.5\Demos>co2dice project tsend 17:59:40 :ERROR:co2dice:IP-10-AAA-2017-1002: Can't trigger event do_sendmail from state wltp_iof!
I cant send it to the email.
Any recomandations?
Thank you.