teltek / Galicaster

The Galicaster Project is an open initiative to provide flexible, state-of-the-art solutions for recording educational multimedia contents like lectures and conferences
galicaster.teltek.es
Other
35 stars 31 forks source link

Unicode and ampersand warnings #300

Open smarquard opened 8 years ago

smarquard commented 8 years ago

Create a recording on Opencast with unicode and an ampersand in the title, e.g.:

GC2x unicodé & ampersand é

The episode.xml file looks like this:

<?xml version="1.0" encoding="utf-8"?>
<dublincore xmlns="http://www.opencastproject.org/xsd/1.0/dublincore/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance/">
   <dcterms:license>Creative Commons 3.0: Attribution-NonCommercial-NoDerivs</dcterms:license>
   <dcterms:created>2016-06-14T10:21:59Z</dcterms:created>
   <dcterms:temporal>start=2016-06-14T10:22:00Z; end=2016-06-14T10:23:00Z; scheme=W3C-DTF;</dcterms:temporal>
   <dcterms:creator>stephen</dcterms:creator>
   <dcterms:spatial>em7</dcterms:spatial>
   <dcterms:isPartOf>46ba68db-ec2a-418b-b664-2e115eab44f2</dcterms:isPartOf>
   <dcterms:title>GC2x unicodé &amp; ampersand é</dcterms:title>
   <dcterms:identifier>56447685</dcterms:identifier>
</dublincore>

The org.opencastproject.capture.agent.properties file llooks like this:

#Capture Agent specific data
#Tue Jun 14 12:21:28 SAST 2016
org.opencastproject.workflow.config.trimHold=true
org.opencastproject.workflow.config.archiveOp=true
org.opencastproject.workflow.definition=full
capture.device.names=audio,presenter
event.series=46ba68db-ec2a-418b-b664-2e115eab44f2
event.title=GC2x unicodé & ampersand é
event.location=em7
org.opencastproject.workflow.config.captionHold=false

When the recording starts, the title is shown correctly in the recorder UI, but the following warnings are shown on the console:

/usr/share/galicaster/galicaster/classui/recorderui.py:390: UnicodeWarning: Unicode unequal comparison failed to convert both arguments to Unicode - interpreting them as being unequal if title.get_text() != next_mediapackage.title:

/usr/share/galicaster/galicaster/classui/recorderui.py:328: UnicodeWarning: Unicode unequal comparison failed to convert both arguments to Unicode - interpreting them as being unequal if rec_title.get_text() != self.recorder.current_mediapackage.getTitle():

On completion of the recording, Galicaster appears to crash

(run_galicaster.py:11259): Gdk-WARNING **: run_galicaster.py: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.

Then on restarting, when you go to the media manager, you get:

(run_galicaster.py:11451): Gtk-WARNING **: Failed to set text 'GC2x unicodé & ampersand é' from markup due to error parsing markup: Error on line 1: Entity did not end with a semicolon; most likely you used an ampersand character without intending to start an entity - escape ampersand as &

hcaloto commented 8 years ago

I think here we have 3 issues:

  1. UnicodeWarning when comparing string and unicode (recorderui) at https://github.com/teltek/Galicaster/issues/458
  2. Warnings when using the Media Manager (this is due to the tooltip, by disabling these tooltips the issue doesn't happen). See https://bugzilla.gnome.org/show_bug.cgi?id=686843
  3. Resource temporarily unavailable on X server :0. This is already in course at https://github.com/teltek/Galicaster/issues/264