Comments (4)
Excellent feedback. Thanks so much, made the changes already. Yeah, all my python version were higher ones both on Linux and macOS. On Windows I had an older version, but that didn't matter for this code path.
from yolo-ai-cmdbot.
from yolo-ai-cmdbot.
@wunderwuzzi23 It seems like platform.freedesktop_os_release()
was removed.. and then added in a newer Python version. What version do you use? I tried on 3.9.2 but got the same error. Updated to 3.11.2 and it works:
>>> import platform
>>> print(platform.freedesktop_os_release())
{'NAME': 'Debian GNU/Linux', 'ID': 'debian', 'PRETTY_NAME': 'Debian GNU/Linux 11 (bullseye)', 'VERSION_ID': '11', 'VERSION': '11 (bullseye)', 'VERSION_CODENAME': 'bullseye', 'HOME_URL': 'https://www.debian.org/', 'SUPPORT_URL': 'https://www.debian.org/support', 'BUG_REPORT_URL': 'https://bugs.debian.org/'}
I see here that people suggest using the distro package instead, but that just returned an empty string with Python 3.9.2:
> python
Python 3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform
>>> print(platform.freedesktop_os_release())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'platform' has no attribute 'freedesktop_os_release'
>>> import distro
>>> print(distro.like())
>>> print(platform.linux_distribution())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'platform' has no attribute 'linux_distribution'
Same response (apart from platform.freedesktop_os_release()
) on 3.11.2. So the suggestion would probably be to update Python to a later version.
Remember that if you update Python, check what version the command python3
uses. To update python3
to use a newer version (like 3.11), after installing the newer version, you can do the following:
update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.11 1
from yolo-ai-cmdbot.
How about using distro:
https://pypi.org/project/distro/
import distro
...
if os_name == "Linux":
dist_name = distro.name(pretty=True)
It now works... this is a fantastic tool BTW.
from yolo-ai-cmdbot.
Related Issues (18)
- Optimise token usage HOT 2
- Running ./install.sh multiple times, keeps adding more and more of the same aliases HOT 2
- Safety switch does not seem to work HOT 2
- Not an issue but feature request
- Textual frontend
- Pip depency resolver HOT 1
- ModuleNotFoundError: No module named 'openai' HOT 5
- can't use it with socks5h proxy HOT 2
- How can I turn the "Execute command" question off after prompting yolo? HOT 1
- Rate Limit HOT 1
- I really need some assistance please HOT 4
- Yolo keeps giving me single line commands in markdown HOT 2
- Openai migrate? HOT 1
- ChatGPT Plus and API access HOT 2
- Mac - FileNotFoundError: [Errno 2] No such file or directory: '/Users/buddha/.openai.apikey' HOT 3
- dependency conflicts installing requirements
- Running command with question adds new lines on Debian via WSL2 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yolo-ai-cmdbot.