WebTools error Python "No module named `requests`"
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
-
- Posts: 2
- Joined: Sun Aug 07, 2022 4:02 pm
WebTools error Python "No module named `requests`"
Hi, I have a freshly installed FreeCAD Flatpak on Fedora 36 and freshly installed WebTools workbench. When I switch to WebTools workbench I get an error "No module named `requests`". I do have requests installed on my system with dnf although I'm not sure if that is relevant or if it's supposed to be installed in the bundled Python interpreter or bundled in the addon itself. I'm new to FreeCAD and not sure how these things work.
Re: WebTools error Python "No module named `requests`"
Hi
try :
mario
try :
Code: Select all
import WebGui
import urllib
from urllib import request
contentPage = request.urlopen(u"https://wiki.freecadweb.org/Macro_Rotate_View").readlines()
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
My macros on Gist.github here complete macros Wiki and forum.
-
- Posts: 2
- Joined: Sun Aug 07, 2022 4:02 pm
Re: WebTools error Python "No module named `requests`"
Code: Select all
Traceback (most recent call last):
File "<input>", line 1, in <module>
ImportError: cannot import name 'requests' from 'urllib' (/usr/lib/python3.9/urllib/__init__.py)
Code: Select all
from urllib import requests
Re: WebTools error Python "No module named `requests`"
Hi
run with
try install https://pypi.org/project/requests/
but i don't remember if i have installed it or if it is part of freecad ??
i use it in my macro Macro_FCInfo for detect the version
mario
run with
Code: Select all
OS: Windows 10 (10.0)
Word size of FreeCAD: 64-bit
Version: 0.21.29485 (Git)
Build type: Release
Branch: master
Hash: a236ca843fdd6674afb6d7ed1454fbd3b547f5ea
Python 3.8.13, Qt 5.12.9, Coin 4.0.0, Vtk 9.1.0, OCC 7.5.3
but i don't remember if i have installed it or if it is part of freecad ??
i use it in my macro Macro_FCInfo for detect the version
mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
My macros on Gist.github here complete macros Wiki and forum.
- adrianinsaval
- Veteran
- Posts: 5551
- Joined: Thu Apr 05, 2018 5:15 pm
Re: WebTools error Python "No module named `requests`"
installing pip packages for flatpak is not trivial, see: https://github.com/flathub/org.freecadw ... /issues/88
so for now I recommend using and rpm version of FreeCAD, I believe there is a COPR repo with current builds available
so for now I recommend using and rpm version of FreeCAD, I believe there is a COPR repo with current builds available