Closed mauro2357 closed 6 years ago
In response to.
"This script is not part of code-maat. Is it the one that was referenced in my book? In that case, please check the recent revision of the script here: https://github.com/adamtornhill/maat-scripts
You should leave out the weightcolumn argument when invoking the script. We should also move the discussion to the maat-scripts repository if you have any follow up questions on the scripts."
I executed the script againleaving out the weightcolumn argument and the problem is the same. There is a strage behavior. the first 2 letters of the modules generated in the json are erased. See the this:
{"name": "root", "children": [{"name": "urces", "children": [{"name": "automatizacion"
The name generated by the script is "urces" but the real name is "sources" as you can see in the scripts:
revisions-domina04012018.txt countlines-domina04012018.txt
This is the generated json
Thanks in advance.
@mauro2357 Thanks for the detailed bug report. I managed to reproduce the problem and it was indeed a bug in the Python script. I have pushed a new version on transform/csv_as_enclosure_json.py
so please try again with this updated version and without the weightcolumn
option.
@mauro2357 Did my patch solve the problem you were reporting? Please let me know and I'll close the issue.
Yes. Thanks
This was moved from https://github.com/adamtornhill/code-maat/issues/53
I am running the python script csv_as_enclosure_json.py and the json is always generated with 0 in the weight attribute.
In debug mode the function normalized_weight_for is not executing "if module_name in normalized_weights:"
These are my files
countlines-domina04012018.txt revisions-domina04012018.txt
And this is the way i execute the script
python csv_as_enclosure_json.py --structure "countlines-domina04012018.csv" --weights "revisions-domina04012018.csv" - weightcolumn 2 > jsond3Domina.json