yorikvanhavre / BIM_Workbench

A BIM Workbench for FreeCAD
363 stars 77 forks source link

IfcOpenShell installation via BIM Setup dialog fails due to addon manager incompatibility #97

Closed azuk closed 2 years ago

azuk commented 2 years ago

If I install BIM workbench using addon manager and then attempt to install IfcOpenShell via "BIM Setup" dialog's "download and install it" link, I get the following error:

01:03:08  Loading list of latest IfcOpenBot builds from https://github.com/IfcOpenBot/IfcOpenShell...
01:03:08  Traceback (most recent call last):
01:03:08    File "/home/foo/.local/share/FreeCAD/Mod/BIM/./BimSetup.py", line 431, in handleLink
01:03:08      getIfcOpenShell()
01:03:08    File "/home/foo/.local/share/FreeCAD/Mod/BIM/./BimSetup.py", line 476, in getIfcOpenShell
01:03:08      u = addonmanager_utilities.urlopen(url1)
01:03:08  AttributeError: module 'addonmanager_utilities' has no attribute 'urlopen'

Indeed, urlopen has been removed from addonmanager_utilities.

OS: Ubuntu 20.04.5 LTS (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.21.30397 (Git)
Build type: Debug
Branch: master
Hash: 541025b9385144cc8935a347a74e57cd269ac4c5
Python 3.8.10, Qt 5.12.8, Coin 4.0.0, Vtk 7.1.1, OCC 7.3.0
Locale: English/United States (en_US)
Installed mods: 
  * dodo
  * BIM.backup1663296114.5945559
  * BIM 2021.12.0
yorikvanhavre commented 2 years ago

@chennes is urlopen still defined somewhere? Or should I use urllib.urlopen here simply?

chennes commented 2 years ago

I'd just use url open directly -- what did the AM-custom version do? Was it just a Py2/Py3 compatibility layer?

yorikvanhavre commented 2 years ago

I believe so... Can't remember exactly. Ok done, thanks!!!