adamerose / adamerose/PandasGUI

No APPDATA environment variable in Linux: expected str, bytes or os.PathLike object, not NoneType

未關閉
#220 11 則留言 8 個 reaction 已指派 0 人 在 GitHub 檢視
bug
主要語言
Python
星號
3.3k
分支
239
PR 合併指標
30 天內沒有已合併 PR

描述

Trying to run

```python3
from pandasgui import show
```

on Ubuntu Linux fails with:

```
Traceback (most recent call last):
File "/home/hfs/usr/bin/pandasgui-file", line 7, in
from pandasgui import show
File "/opt/mambaforge/envs/pandasgui/lib/python3.11/site-packages/pandasgui/__init__.py", line 15, in
from pandasgui.gui import show
File "/opt/mambaforge/envs/pandasgui/lib/python3.11/site-packages/pandasgui/gui.py", line 13, in
from pandasgui.constants import PANDASGUI_ICON_PATH
File "/opt/mambaforge/envs/pandasgui/lib/python3.11/site-packages/pandasgui/constants.py", line 15, in
SHORTCUT_PATH = os.path.join(os.getenv('APPDATA'), 'Microsoft/Windows/Start Menu/Programs/PandasGUI.lnk', )
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 76, in join
```

`APPDATA` is a Windows-specific environment variable.

As a workaround one can set the variable to a dummy value:

```bash
export APPDATA=
```

In general it would be nice if “adding to the start menu” was wrapped in some operating system detection, because it only makes sense on Windows anyway.

**Environment**
OS: Ubuntu 22.04.2 LTS
Python: Python 3.11.0

**Package versions**
```
ipython @ file:///home/conda/feedstock_root/build_artifacts/ipython_1677617093347/work
jupyter_core @ file:///home/conda/feedstock_root/build_artifacts/jupyter_core_1675109859355/work
pandasgui==0.2.14
plotly @ file:///home/conda/feedstock_root/build_artifacts/plotly_1677271849976/work
PyQt5==5.15.7
PyQt5-sip==12.11.0
PyQtWebEngine==5.15.6
PyQtWebEngine-Qt5==5.15.2
```

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

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

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