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

I have got an error message "Chart download failed." #8

Closed
Mars2105 opened this issue Jul 2, 2015 · 12 comments
Closed

I have got an error message "Chart download failed." #8

Mars2105 opened this issue Jul 2, 2015 · 12 comments

Comments

@Mars2105
Copy link

Mars2105 commented Jul 2, 2015

Hello,

I have got always an error message "Chart download failed." after typing a diagramm URL, e.g. for URL http://cf.datawrapper.de/d02Bg/1/

This URL is correct. How can I eliminate this error. I have a very little knowlidges about ruby on rails.

error

My apache settings are
apache_settings

Many thanks for your help.
Slava

@tf
Copy link
Member

tf commented Jul 2, 2015

Hi Slava,

please have a look in the log file of the background worker scraping the charts: log/jobs/production/scraping.log.

Datawrapper changed their URL scheme recently. Newly generated charts have URLs starting with datawrapper.dwcdn.net. The old datawrapper charts cause a connection refused error, while trying to access http://piwik.datawrapper.de/piwik.js. I also see that error in the DevTools console when I open your chart URL in Chrome.

In my case that error caused scraping of charts to fail.

To use the new datawrapper URL scheme, you need to add it to the list of supported hosts in the pageflow-chart initializer. I'll update the README now since I think it is not yet mentioned there.

Cheers

@Mars2105
Copy link
Author

Mars2105 commented Jul 2, 2015

Many thanks for your answer.

We have the problem resolved.

Strange but the version of pageflow-chart folder has other content of files
as on this page https://github.com/codevise/pageflow-chart

For this reason I have replaced the folder "pageflow-chart" completely with
the last GIT version (gem version 0.1.0)

$ cd /var/lib/gems/2.1.0/gems
$ rm -Rf pageflow-chart-0.1.0/
$ git clone https://github.com/codevise/pageflow-chart.git
pageflow-chart-0.1.0
$ cd pageflow-chart-0.1.0
$ ls -l
$ service apache2 restart

Many thanks for your support.
Slava

@Mars2105
Copy link
Author

Mars2105 commented Jul 2, 2015

Can I use this URL?
https://charts.datawrapper.de/LCHQB/index.html

@tf
Copy link
Member

tf commented Jul 2, 2015

You have to add a new supported host in the initializer. See the updated README (configuration section)

I've now released v0.1.1. Before, there were some yet unreleased changes in the github repository. If you wish to use an upstream version straight from github again in the future, I'd suggest using bundler's git support instead of tinkering with the gem folder manually.

@Mars2105
Copy link
Author

Mars2105 commented Jul 2, 2015

Like this?
File config/initializers/pageflow_chart.rb

Pageflow::Chart.configure do |config|
config.scraped_sites_root_url = '/datawrapper'

Allow scraping charts from custom account URLs

config.supported_hosts << 'http://charts.datawrapper.de'
end

@Mars2105
Copy link
Author

Mars2105 commented Jul 2, 2015

Which command must I use?
gem update pageflow-chart or other?

@tf
Copy link
Member

tf commented Jul 2, 2015

Yes, that's the correct config file.

@tf
Copy link
Member

tf commented Jul 2, 2015

No. You have to use bundler. Please understand that we can not provide support for general Ruby on Rails questions in this context.

Have a look at the Updating Pageflow wiki page. The steps there also apply to other pageflow gems like this one. Also have a look at the bundler docs for more background info.

@Mars2105
Copy link
Author

Mars2105 commented Jul 2, 2015

Thank you.
gem 'pageflow-chart', git: 'https://github.com/codevise/pageflow-chart.git'

@tf
Copy link
Member

tf commented Jul 2, 2015

Or simply gem 'pageflow-chart' in the Gemfile and then bundle update pageflow-chart to update the Gemfile.lock.

@Mars2105
Copy link
Author

Mars2105 commented Jul 2, 2015

Many thanks! It works!

@tf
Copy link
Member

tf commented Jul 2, 2015

Great. I'll close this issue then.

@tf tf closed this as completed Jul 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants