Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Third-party module classes not detected when setting PYTHONPATH in a shell file

未關閉
#380 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
25/100
Issue 類型
缺陷
描述清晰度
需要釐清
活躍度
停滯
技術堆疊
bash, javascript, python
領域
tooling

研究方向

首先使用提供的 run.sh 重现缺失的 GAMS 类别侦测,并比较 package 版本 1.9.3 和 1.9.4。追踪 package 如何呼叫设定的 Python 路径以及读取 PYTHONPATH。使用 run.sh 时能够再次侦测到 gams 模组中的类别,即表示完成。

由索引模型根據 Issue 內容生成。

描述

good first issue

I've defined a shell script inside the root of my project, called run.sh. What it does is, adds two paths relating to a third-party module (GAMS Python API), to PYTHONPATH environment variable, and then calls python with all arguments given to the script:

#!/bin/bash

export PYTHONPATH=/opt/gams/gams34.3_linux_x64_64_sfx/apifiles/Python/api_39/:"$PYTHONPATH"
export PYTHONPATH=/opt/gams/gams34.3_linux_x64_64_sfx/apifiles/Python/gams/:"$PYTHONPATH"
export PYTHONPATH="$(pwd)":"$PYTHONPATH"

python3 $@

In the package settings, I've configured the python path to ./run.sh, for the script to be called and the module being detected by the package.

However, after updating the package version to 1.9.4, it no longer detects the classes inside the gams module:

Screenshot from 2021-08-05 14-16-19

Note that, the script works perfectly with 1.9.3. I downgraded the package and then upgraded it, and it seems it is reproducable for me.

(I don't think the system specs are needed, as I just mentioned, the issue is new in 1.9.4, with exact set of packages and Atom version)

主要語言
JavaScript
星號
238
分支
41
PR 合併指標
30 天內沒有已合併 PR

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

atom-community/ide-python 的其他 Issue

查看 atom-community/ide-python 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。