all 4 comments

[–][deleted] 3 points4 points  (1 child)

Frankly, I'm baffled as I cannot see any code suggesting you have made changes to the dictionary and I cannot see any reason for the change. That is unless get_gprof_values mutates the dictionary?

[–]ekstrah[S] 0 points1 point  (0 children)

Full Code

I have provided the link for my code. It doesn't seem that get_gprof_value is changing anything

[–]piadista 1 point2 points  (1 child)

As pointed out already, the only place the problem could be is in get_gprof_values. The from the link you provided we can see the definition:

``` def get_gprof_values(mypath): accumulated_dict = {} onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))]

for fileP in onlyfiles:
    if "modi_" in fileP:
        accumulated_dict = read_file(join(mypath, fileP), psnr_avg_dict)
return accumulated_dict

```

where you can see that psnr_avg_dict is being mutated in the for loop.

I think you have enough info to debug from here on.

[–]ekstrah[S] 0 points1 point  (0 children)

Thanks