Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

captions.json is html and error when parsing almost empty xml file #56

Open
highlando opened this issue Oct 15, 2021 · 4 comments
Open
Labels
bug Something isn't working

Comments

@highlando
Copy link

Hi Daniel,
didn't think of a better way to get in touch with you.
I was trying to use your scripts to export a BBB recording.

However, ....

with ruby download_client.rb I run into an JSON parsing error in line 39

# Download all captions
json = JSON.parse(File.read('captions.json'))

In fact, this captions.json file looks not much like a json file: <!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/playback/presentation/2.3/favicon.ico"/>...

If I comment out the relevant lines, the script completes.

However, I'm not able to run ruby export_presentation.rb successfully because of

	4: from export_presentation.rb:749:in `<main>'
	3: from export_presentation.rb:723:in `export_presentation'
	2: from export_presentation.rb:278:in `parse_whiteboard_shapes'
	1: from /var/lib/gems/2.7.0/gems/nokogiri-1.12.5-x86_64-linux/lib/nokogiri/xml/reader.rb:103:in `each'
/var/lib/gems/2.7.0/gems/nokogiri-1.12.5-x86_64-linux/lib/nokogiri/xml/reader.rb:103:in `read': 2:1: FATAL: Extra content at the end of the document (Nokogiri::XML::SyntaxError)

which is (as far as I understand the code) caused by line 722/723

  shapes, slides, timestamps =
   parse_whiteboard_shapes(Nokogiri::XML::Reader(File.open("#{@published_files}/shapes_modified.svg")))

and my "shapes_modified.svg" look like this:

# cat shapes_modified.svg                   
<?xml version="1.0"?>

I've tested this for two different recordings on different BBB servers with the same result. I can provide the links to the recordings if someone wants to have it.

@danielpetri1
Copy link
Owner

Hi @highlando, thanks for reaching out. Can you provide the recording link? Via email if the contents are sensitive. I'll then take a look at it, I couldn't make the problem out by looking at these lines.

Is that BBB 2.4? The contents of the captions file are very different compared to what they should look like.
Regards,
Daniel

@highlando
Copy link
Author

highlando commented Oct 15, 2021 via email

@highlando
Copy link
Author

The version of BBB is 2.3.14

@danielpetri1
Copy link
Owner

danielpetri1 commented Oct 19, 2021

@highlando Sorry for delayed reply. Unfortunately GitHub censored your email. You can reach me at daniel dot petri at tum de . Since the script is compatible with 2.3.14, it should not be a difficult fix. Have you tried commenting out the captions download?

@danielpetri1 danielpetri1 added the bug Something isn't working label Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants