question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Some YB tests fail with conda Python 3.7 & Matplotlib 3.x

See original GitHub issue

I’m trying to run the tests. I get 133 failures, many of them

E   AssertionError: 'Qt5Agg' != 'agg'

Does running the tests require setting a specific backend?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
rebeccabilbrocommented, Jan 22, 2019

Hey there @amueller – nice to see you here in the YB issues!

In response to your question, yes, in order to ensure our image comparison tests work across many different operating systems (or at least don’t fail with backend errors!), we’ve found that we need to use Agg.

Agg has to be set before importing pyplot, so that’s why we’ve got it on our test import (here). We also expect developers will run the tests using pytest from the root directory of YB (perhaps we should make this more clear in the contributor docs!). Running tests in this way will ensure the backend gets set properly first.

But, just out of curiosity (and to help our future contributors!)-- do you have a custom config or backend for Matplotlib? Also, what do you usually run tests with (nose? pytest?)?

1reaction
tacaswellcommented, Jan 24, 2019

A sure-fire way to fix this is to set the MPLBACKEND=agg env which overrides any other configuration files.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pip install matplotlib fails on M1 Mac - python - Stack Overflow
After this it tries installing version 3.3.3 after which the same happens again, and so on. What goes wrong? Here is some of...
Read more >
Changelog — documentación de Yellowbrick - v1.4
Implement new set_params and get_params on ModelVisualizers to ensure wrapped estimator is being correctly accessed via the new Estimator methods. Fix the test...
Read more >
pycse - Python3 Computations in Science and Engineering
This is a collection of examples of using python in the kinds of scientific and engineering computations I have used in classes and...
Read more >
Fastai v2 text
Has anyone faced a dead kernel error while using the Tokenizer class? ... Any and all help would be greatly appreciated. cc @jeremy....
Read more >
Yellowbrick Documentation - Read the Docs
Yellowbrick is a Python 3 package and works well with 3.4 or later. ... If the test error doesn't match the train error...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found