qs.plots.snapshot on a Linux Debian GNU/Linux 12 (bookworm) does't work.

Open Beginner friendly
#592 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
69/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python

Research direction

Read quantstats/_plotting/wrappers.py around snapshot, especially the show handling and _plt.close(). Check how show=True behaves on Debian GNU/Linux 12 and compare it with the proposed blocking display change. Done means snapshots display correctly on that platform while existing behavior remains covered by relevant plotting checks.

Written by the indexing model from the issue text.

Description

This change fix the problem:

diff --git a/quantstats/_plotting/wrappers.py b/quantstats/_plotting/wrappers.py
index 3c38fc5..16e660a 100644
--- a/quantstats/_plotting/wrappers.py
+++ b/quantstats/_plotting/wrappers.py
@@ -398,7 +398,7 @@ def snapshot(
 
     # Show plot if requested
     if show:
-        _plt.show(block=False)
+        _plt.show(block=True)
 
     _plt.close()
Dominant language
Python
Stars
7.9k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ranaroussi/quantstats

All issues in ranaroussi/quantstats

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.