Error executing time_in_status
cmbyrne opened this issue · 6 comments
Getting an error when executing time_in_status.
config = json.load(open('config.json'))
LOGIN(**config)
key = {"jql": "Sprint = 1892 order by created DESC"}
temp = time_in_status(PROJECT, key, file_reader, pprint=True, is_printable=True,
output_format="json", report_folder="STATUSPAGE", report_file="time.json",
login=LOGIN, output_filename="result")
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm Community Edition 2021.1.3\plugins\python-ce\helpers\pydev\pydevd.py", line 1483, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Program Files\JetBrains\PyCharm Community Edition 2021.1.3\plugins\python-ce\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:/Users/Ce/PycharmProjects/StatusTime/main.py", line 20, in
temp = time_in_status(PROJECT, key, file_reader, pprint=True, is_printable=True,
File "C:\Users\Ce.virtualenvs\StatusTime-ViV0hHXO\lib\site-packages\jiraone\module.py", line 168, in time_in_status
items = data_dog.make(histories)
File "c:\program files\python39\lib\collections_init.py", line 441, in _make
raise TypeError(f'Expected {num_fields} arguments, got {len(result)}')
TypeError: Expected 13 arguments, got 0
python-BaseException
In your report_file "time.json"
is there any new line or empty space between the header and the next row of data?
Yes, there is a blank line between every row and it is csv even though json was specified
Issue Key,Summary,Author,Created,Field Type,Field,Field Id,From,From String,To,To String,From AccountId,To AccountId
IM-23511,Test Execution,Shivangi Pandey,2022-02-28T10:19:35.666-0600,,status,,1,Not Started,6,Closed,,
IM-23511,Test Execution,Shivangi Pandey,2022-02-28T10:33:43.231-0600,jira,status,,1,Not Started,6,Closed,,
IM-23510,Test GDSN 3.1.19 : Attribute Mapping and check in VV properties,Shivangi Pandey,2022-02-28T10:17:33.593-0600,,status,,1,Not Started,6,Closed,,
IM-23510,Test GDSN 3.1.19 : Attribute Mapping and check in VV properties,Shivangi Pandey,2022-02-28T10:34:59.097-0600,jira,status,,1,Not Started,6,Closed,,
IM-23505,Test Execution,Shivangi Pandey,2022-02-28T00:15:58.071-0600,,status,,1,Not Started,6,Closed,,
IM-23505,Test Execution,Shivangi Pandey,2022-02-28T00:17:44.971-0600,jira,status,,1,Not Started,6,Closed,,
IM-23504,Test Removal of Connection Error Popup,Shivangi Pandey,2022-02-28T00:13:42.350-0600,,status,,1,Not Started,6,Closed,,
IM-23504,Test Removal of Connection Error Popup,Shivangi Pandey,2022-02-28T00:17:48.477-0600,jira,status,,1,Not Started,6,Closed,,
IM-23496,Update GDSN Schema in PreProd to point to Prod Schemas,Rabin Pradhan,2022-02-24T12:23:54.553-0600,,status,,1,Not Started,10031,Ready to Test,,
IM-23496,Update GDSN Schema in PreProd to point to Prod Schemas,Rabin Pradhan,2022-02-24T15:18:28.774-0600,jira,status,,1,Not Started,10031,Ready to Test,,
IM-23496,Update GDSN Schema in PreProd to point to Prod Schemas,Rabin Pradhan,2022-02-24T15:18:33.298-0600,jira,status,,10031,Ready to Test,10362,QA In Progress,,
IM-23496,Update GDSN Schema in PreProd to point to Prod Schemas,Rabin Pradhan,2022-02-24T15:18:39.550-0600,jira,status,,10362,QA In Progress,10191,Ready for Product Demo,,
IM-23496,Update GDSN Schema in PreProd to point to Prod Schemas,Manjari Ratho,2022-02-25T14:05:55.613-0600,jira,status,,10191,Ready for Product Demo,6,Closed,,
That argument only reads plain text files which is CSV
, example from the docs time_in_status->report_file
. Also, I think for windows machine it might be adding an extra carriage return \r
to the file so it becomes \r\r\n
rather than \r\n
denoting a newline. I think I might know what the cause might be and a possible fix for it. I will push an update asap, then you can let me know if that fixes the problem.
Pushed an update @cmbyrne let me know if that fixes this issue for you?
Do you mean it does take into account weekends and holidays
? Because it should calculate all days irrespective if it is a working day or not. Also had to edit your comment to remove some content, I believe it contained identifiable info.