Micro-sheep / Micro-sheep/efinance

请支持通过环境变量制定数据缓存目录

Open
#204 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
4.1k
Forks
755
PR merge metrics
No merged PRs in 30d

Description

大神你好,我使用efinance库在streamlit cloud上部署一个简单的应用,会报如下错误。原因是efinance库会建立缓存目录,而在云端环境有权限限制。能否在相应位置增加通过环境变量制定数据缓存目录的功能,谢谢

/usr/local/lib/python3.9/pathlib.py:1323 in mkdir

1320 │ │ Create a new directory at this given path.

1321 │ │ """

1322 │ │ try:

❱ 1323 │ │ │ self._accessor.mkdir(self, mode)

1324 │ │ except FileNotFoundError:

1325 │ │ │ if not parents or self.parent == self:

1326 │ │ │ │ raise

────────────────────────────────────────────────────────────────────────────────

PermissionError: [Errno 13] Permission denied:

'/home/adminuser/venv/lib/python3.9/site-packages/efinance/config/../data'

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the cache creation from the reported efinance/config/../data path and identify where the data directory is selected. Add support for choosing that directory through an environment variable, then verify that a writable location can be used in the Streamlit Cloud deployment without the reported PermissionError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.