-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No APPDATA environment variable in Linux: expected str, bytes or os.PathLike object, not NoneType #220
Comments
I'm having a similar issue on my mac?TypeError Traceback (most recent call last) File ~/opt/anaconda3/envs/streamlit/lib/python3.8/site-packages/pandasgui/init.py:15, in File ~/opt/anaconda3/envs/streamlit/lib/python3.8/site-packages/pandasgui/gui.py:13, in File ~/opt/anaconda3/envs/streamlit/lib/python3.8/site-packages/pandasgui/constants.py:15, in File ~/opt/anaconda3/envs/streamlit/lib/python3.8/posixpath.py:76, in join(a, *p) TypeError: expected str, bytes or os.PathLike object, not NoneType |
Where to execute "export APPDATA=" ? |
I just commended out the line |
Where did you comment out the line? |
having the same issue on my mac; can not find a solution |
I got same error on my mac. |
The PyPI version may be old. |
I put the following in my script: import os |
Same issue for me on a debian based distribution. If possible I think it could be beneficial for the package to tackle this issue. Some possible new users might become disheartend by the error and dish this great package without ever using it. Installing directly from git is sadly not always possible in an enterprise setting.
This fixed the error. That being said, it does not work well in devcontainer at all, my next barrier would be
|
To solve the issue I did : git clone https://github.com/adamerose/PandasGUI.git
cd PandasGUI
nano pandasgui/constants.py Commented the 3 last line : #SHORTCUT_PATH = os.path.join(os.getenv('APPDATA'), 'Microsoft/Windows/Start Menu/Programs/PandasGUI.lnk', )
#PY_INTERPRETTER_PATH = os.path.join(os.path.dirname(sys.executable), 'python.exe')
#PYW_INTERPRETTER_PATH = os.path.join(os.path.dirname(sys.executable), 'pythonw.exe') saved the file and : pip install . And it's now working (Ubuntu 22.04, python3.10) |
Trying to run
on Ubuntu Linux fails with:
APPDATA
is a Windows-specific environment variable.As a workaround one can set the variable to a dummy value:
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
The text was updated successfully, but these errors were encountered: