2021-05-16 10:35:50 |
1pogaz |
bug |
|
|
added bug |
2021-05-16 10:35:50 |
1pogaz |
attachment added |
|
Capture d’écran 2021-05-16 121543.png https://bugs.launchpad.net/bugs/1928579/+attachment/5497954/+files/Capture%20d%E2%80%99%C3%A9cran%202021-05-16%20121543.png |
|
2021-05-16 10:39:44 |
1pogaz |
description |
When your try to modify all identifiers (*) with the template function, if the value of an output identifier contains a colon (like url:http://www.gutenberg.org/ebooks/17691 ) the field will not be modified.
I discovered the problem when I created a plugin (Mass Search/Replace) that uses the same code as MetadataBulkDialog() from metadata_bulk.py
Apparently, the Search/Replace in the main interface does not raise the error.
if dst_id_type and dst_id_type != '*':
v = ''.join(val)
ids = mi.get(dest)
ids[dst_id_type] = v
val = ids
else:
try:
val = dict([(t.split(':')) for t in val]) ## <= This is where the error occurs
except:
raise Exception(_('Invalid identifier string. It must be a '
'comma-separated list of pairs of '
'strings separated by a colon')) |
When your try to modify all identifiers (*) with the template function, if the value of an output identifier contains a colon (like url:http://www.gutenberg.org/ebooks/17691 ) the field will not be modified.
Look at the attached image for example. The preview works, but the fields are not modified.
I discovered the problem when I created a plugin (Mass Search/Replace) that uses the same code as MetadataBulkDialog() from metadata_bulk.py
Apparently, the Search/Replace in the main interface does not raise the error.
if dst_id_type and dst_id_type != '*':
v = ''.join(val)
ids = mi.get(dest)
ids[dst_id_type] = v
val = ids
else:
try:
val = dict([(t.split(':')) for t in val]) ## <= This is where the error occurs
except:
raise Exception(_('Invalid identifier string. It must be a '
'comma-separated list of pairs of '
'strings separated by a colon')) |
|
2021-05-16 10:54:37 |
1pogaz |
description |
When your try to modify all identifiers (*) with the template function, if the value of an output identifier contains a colon (like url:http://www.gutenberg.org/ebooks/17691 ) the field will not be modified.
Look at the attached image for example. The preview works, but the fields are not modified.
I discovered the problem when I created a plugin (Mass Search/Replace) that uses the same code as MetadataBulkDialog() from metadata_bulk.py
Apparently, the Search/Replace in the main interface does not raise the error.
if dst_id_type and dst_id_type != '*':
v = ''.join(val)
ids = mi.get(dest)
ids[dst_id_type] = v
val = ids
else:
try:
val = dict([(t.split(':')) for t in val]) ## <= This is where the error occurs
except:
raise Exception(_('Invalid identifier string. It must be a '
'comma-separated list of pairs of '
'strings separated by a colon')) |
When your try to modify all identifiers (*) with the template function, if the value of an output identifier contains a colon (like url:http://www.gutenberg.org/ebooks/17691 ) the field will not be modified.
Look at the attached image for example. The preview works, but the fields are not modified.
I discovered the problem when I created a plugin (Mass Search/Replace) that uses the same code as MetadataBulkDialog() from metadata_bulk.py
Apparently, the Search/Replace in the main interface does not raise the error.
if dst_id_type and dst_id_type != '*':
v = ''.join(val)
ids = mi.get(dest)
ids[dst_id_type] = v
val = ids
else:
try:
val = dict([(t.split(':')) for t in val]) ## <= This is where the error occurs
except:
raise Exception(_('Invalid identifier string. It must be a '
'comma-separated list of pairs of '
'strings separated by a colon'))
EDIT: FIX?
val = dict([(t[:t.find(':')], t[t.find(':')+1:]) for t in val]) |
|
2021-05-16 11:11:32 |
1pogaz |
description |
When your try to modify all identifiers (*) with the template function, if the value of an output identifier contains a colon (like url:http://www.gutenberg.org/ebooks/17691 ) the field will not be modified.
Look at the attached image for example. The preview works, but the fields are not modified.
I discovered the problem when I created a plugin (Mass Search/Replace) that uses the same code as MetadataBulkDialog() from metadata_bulk.py
Apparently, the Search/Replace in the main interface does not raise the error.
if dst_id_type and dst_id_type != '*':
v = ''.join(val)
ids = mi.get(dest)
ids[dst_id_type] = v
val = ids
else:
try:
val = dict([(t.split(':')) for t in val]) ## <= This is where the error occurs
except:
raise Exception(_('Invalid identifier string. It must be a '
'comma-separated list of pairs of '
'strings separated by a colon'))
EDIT: FIX?
val = dict([(t[:t.find(':')], t[t.find(':')+1:]) for t in val]) |
When your try to modify all identifiers (*) with the template function, if the value of an output identifier contains a colon (like url:http://www.gutenberg.org/ebooks/17691 ) the field will not be modified.
Look at the attached image for example. The preview works, but the fields are not modified.
I discovered the problem when I created a plugin (Mass Search/Replace) that uses the same code as MetadataBulkDialog() from metadata_bulk.py
Apparently, the Search/Replace in the main interface does not raise the error.
if dst_id_type and dst_id_type != '*':
v = ''.join(val)
ids = mi.get(dest)
ids[dst_id_type] = v
val = ids
else:
try:
val = dict([(t.split(':')) for t in val]) ## <= This is where the error occurs
except:
raise Exception(_('Invalid identifier string. It must be a '
'comma-separated list of pairs of '
'strings separated by a colon'))
EDIT: FIX?
val = dict([(t.split(':', 1)) for t in val]) |
|
2021-05-16 12:15:33 |
Kovid Goyal |
calibre: status |
New |
Fix Released |
|