Closed cgirardi closed 12 years ago
@cgirardi -- this is caused by the MultiSelectField
; the value of such a field is a Python list containing the integer Strings, e.g., ['1', '3']
.
Whenever you serialise such a MultiSelectField
, you will end up with a hexadecimal String that encodes a bit vector containing the actual choices.
See repo2/fields.py
for an example how to convert the bit vector String to a Python list (to_python()
).
@cgirardi -- Please merge in upstream
first; you seem to be working on an oudated version!
Closing this issue for the moment; re-open if the error still pops up in the current code...
Thanks! I'll correct it soon. C:
Inizio: Christian Federmann [reply@reply.github.com] Inviato: venerdì 23 marzo 2012 10.04 Fine: Christian Girardi Oggetto: Re: [META-SHARE] Error on licence viewing (#53)
@cgirardi -- this is caused by the MultiSelectField
; the value of such a field is a Python list containing the integer Strings, e.g., ['1', '3']
.
Whenever you serialise such a MultiSelectField
, you will end up with a hexadecimal String that encodes a bit vector containing the actual choices.
See repo2/fields.py
for an example how to convert the bit vector String to a Python list (to_python()
).
Reply to this email directly or view it on GitHub: https://github.com/metashare/META-SHARE/issues/53#issuecomment-4655686
Read my other comment -- you seem to be working on an outdated version!
Christian Federmann Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
On Friday, March 23, 2012 at 10:07 AM, cgirardi wrote:
Thanks! I'll correct it soon. C:
Inizio: Christian Federmann [reply@reply.github.com (mailto:reply@reply.github.com)] Inviato: venerdì 23 marzo 2012 10.04 Fine: Christian Girardi Oggetto: Re: [META-SHARE] Error on licence viewing (#53)
@cgirardi -- this is caused by the
MultiSelectField
; the value of such a field is a Python list containing the integer Strings, e.g.,['1', '3']
.Whenever you serialise such a
MultiSelectField
, you will end up with a hexadecimal String that encodes a bit vector containing the actual choices.See
repo2/fields.py
for an example how to convert the bit vector String to a Python list (to_python()
).
Reply to this email directly or view it on GitHub: https://github.com/metashare/META-SHARE/issues/53#issuecomment-4655686
Reply to this email directly or view it on GitHub: https://github.com/metashare/META-SHARE/issues/53#issuecomment-4655719
OK!
If you see for instance: http://metashare.fbk.eu/repo2/download/932/
an error occor in line 232 of repo2/views.py: licencelabel = LICENCEINFOTYPE_LICENCE_CHOICES['choices'] \ [int(licenceinfo['licence'])][1]
The problem seems that the value of licenceinfo['licence'] is like "00000800000" but in the past it was simply "8".
I'm working to solve...