open-research / sumatra

http://neuralensemble.org/sumatra/
BSD 2-Clause "Simplified" License
127 stars 48 forks source link

Script parameters not displayed in web-interface #258

Open shapovalov opened 9 years ago

shapovalov commented 9 years ago

In Sumatra 0.6.0, my parameters are displayed correctly in smt list, but not in the web interface. In the django template, the for-loop over items executes 0 times. I debugged up to the following point. In views.py:record_detail(), the rendering is called:

    return render_to_response('record_detail.html', {'record': record,
                                                     'project_name': project,
                                                     'parameters': parameter_set,
                                                     'form': form
                                                     })

It turns out that parameter_set here is a string representation of a dictionary rather than the actual dictionary. If I parse it beforehand (using the ast module), it is displayed correctly.

Thus, the parameter_set is probably not parsed correctly during de-serialisation. If that is important, some values in my dictionary are unicode.

Environment: Python 2.7, Sumatra 0.6.0, django-tagging 0.3.3, and Django 1.6.10.

shapovalov commented 9 years ago

Here is the diff that fixed the problem for me: https://github.com/ArtecGroup/sumatra/commit/ca3045efd4325a0f847de6f1ee7fecce4609e872

maxalbert commented 9 years ago

Is this still an issue with the latest version of Sumatra?