Closed QAQTATQAQTAT closed 3 years ago
An error was reported when I want to process DiDiData.I'm sure I had follow the tutorial and put the data into the appropriate file with correct format.
Traceback (most recent call last): File "get_grid_data_didi.py", line 104, in parameters=parameterList File "/home/gt/UCTB/DataProcessing/DiDi/multi_threads.py", line 31, in multiple_process return reduce(reduce_func, result_list) TypeError: reduce() of empty sequence with no initial value
The error occurs when calling multi-process functions, please provide your running parameters, especially the job parameters. Try to set the job parameter to 1 and try again.
I had set the jobs parameter to 1,but the error still occurs.
jlu@ubuntu-JLU:/home/gt/UCTB/DataProcessing/DiDi$ python get_grid_data_didi.py --data DiDi --city Chengdu --jobs 1
Traceback (most recent call last):
File "get_grid_data_didi.py", line 104, in
I had set the jobs parameter to 1,but the error still occurs.
jlu@ubuntu-JLU:/home/gt/UCTB/DataProcessing/DiDi$ python get_grid_data_didi.py --data DiDi --city Chengdu --jobs 1
Traceback (most recent call last): File "get_grid_data_didi.py", line 104, in parameters=parameterList File "/home/gt/UCTB/DataProcessing/DiDi/multi_threads.py", line 32, in multiple_process return reduce(reduce_func, result_list) TypeError: reduce() of empty sequence with no initial value
I run the above code and it works. I use python 3.6(built-in functions) in windows 64bits OS.
python get_grid_data_didi.py --data DiDi --city Chengdu --jobs 1
Parent process 9288.
Waiting for all sub_processes done...
chengdu_gps_20161001.json
chengdu_gps_20161002.json
...
I try it again and it works when I change the jobs as 32 and the dataset covers a period of only one month .I use python3.7 in ubuntu 64bits OS. However, the result doesn't change when it's initialized(All is zero).I found it because I can't open json file.The json file is too big,the load function provided the json package can't open these files in my server.Perhaps it was a mistake caused by limited computer performance.
An error was reported when I want to process DiDiData.I'm sure I had follow the tutorial and put the data into the appropriate file with correct format.
Traceback (most recent call last): File "get_grid_data_didi.py", line 104, in
parameters=parameterList
File "/home/gt/UCTB/DataProcessing/DiDi/multi_threads.py", line 31, in multiple_process
return reduce(reduce_func, result_list)
TypeError: reduce() of empty sequence with no initial value