Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

SunsetWolf
Copy link
Collaborator

Description

Setting auto_mount=True when using qlib.__init__ triggers an error:

  • the first time you can execute it without any problem, but the second time you will get an error;
  • or when you manually mount it, you execute qlib.__init__(auto_mount=True);

In both cases, you will get an error.

AttributeError: ‘str’ object has no attribute ‘decode’.

Reason:
When text=True: stdout.readlines() returns a list of str's. But decode(“utf-8”) is also called here, and str does not have a decode method, so it is reported:

Motivation and Context

How Has This Been Tested?

  • Pass the test by running: pytest qlib/tests/test_all_pipeline.py under upper directory of qlib.
  • If you are adding a new feature, test on your own test scripts.

Screenshots of Test Results (if appropriate):

  1. Pipeline test:
  2. Your own tests:

Types of changes

  • Fix bugs
  • Add new feature
  • Update documentation

@SunsetWolf SunsetWolf merged commit 213eb6c into main Sep 11, 2025
77 checks passed
@SunsetWolf SunsetWolf deleted the fix_auto_mount_bug branch September 11, 2025 12:05
kei-yamazaki added a commit to kei-yamazaki/qlib that referenced this pull request Sep 13, 2025
wangbin94 pushed a commit to wangbin94/qlib that referenced this pull request Sep 15, 2025
* fix: the bug when auto_mount=True

* fix: the bug when auto_mount=True
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

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.