Code Monkey home page Code Monkey logo

Comments (14)

APEbbers avatar APEbbers commented on June 24, 2024 2

Hi,

I've removed the dependency for openpyxl. I've made it an optional library for now and the current version of the WB doesn't need it. If you update to version 0.0.5.9, the problem should be fixed.

So for now the issue is solved. However in the future this problem might occur again. The problems are related to the image systems in Linux. specificly snap and flatpack. These images needs a manual install for any python package that is not standard shipped with FreeCAD

from billofmaterials-wb.

APEbbers avatar APEbbers commented on June 24, 2024

Hi,

I think that is because I use openpyxl to convert letters to numbers and visa verca. Since yesterday, the Bill of Materials is available through the add-on manager. in the package.xml I've put openpyxl as a depency.

Does this error still happen when you install the wb via the add-on manager?

from billofmaterials-wb.

furgo16 avatar furgo16 commented on June 24, 2024

In my case, the Add-on Manager warns me of the missing dependency (but does not offer to install it). If I install the dependency manually, then I can resume the installation and it works. Running FreeCAD dev on Linux via snap.

from billofmaterials-wb.

GRiba97 avatar GRiba97 commented on June 24, 2024

Unfortunely it's still happening, I tried to install the WB via add-on manager and repeated the same mesage that @furgo16 received. For me that I'm a newbie to python, I don't even know how to install openpyxl manually. If you can help, please explain how to install manually or put openpyxl package together with the BoMWB files.

from billofmaterials-wb.

APEbbers avatar APEbbers commented on June 24, 2024

Hi,

I've updated the package.xml to the latest standard, however I don't suspect that it makes any difference.
I've followed the documentation from FreeCAD. However I know that there are some issues with snap. These are not specific for this WB as far as I can see.
I've tested the WB on Linux (Debian) with AppImage. That seems to work ok.

I did find some info regarding snap images. with information on how to install/update python packages:

I've also a link about the use of AppImages:

A alternative option to "Install" dependencies can be to do the following: ('ve done this in the past in Windows)

  • Install the python package in you local python: -> pip install openpyxl.
  • Then copy the folders: "..\Python3.11\Lib\site-packages\openpyxl" and ..\Python3.11\Lib\site-packages\openpyxl-3.1.2.dist-info"
  • Paste them in "\FreeCAD\bin\Lib\site-packages".
    I've got this approeach from: https://forum.freecad.org/viewtopic.php?p=189864#p189864

I hope this helps. In the meantime, I'll look into this further, because I plan to use openpyxl for other functions as well.

kind regards,

Paul

from billofmaterials-wb.

M-Welsch avatar M-Welsch commented on June 24, 2024

Had the same problem. I use FreeCAD-Realthunder and I installed it using snap.

I solved it by opening the python console in FreeCAD and entering

import subprocess
subprocess.run('python -m pip install openpyxl'.split())

I guess the same works for the "vanilla" FreeCAD and without snap. Hope it helps someone :)

best
Maxi

from billofmaterials-wb.

furgo16 avatar furgo16 commented on June 24, 2024

The way I manually install Python dependencies for FreeCAD is the one documented on the snap package. E.g.:

  1. Open a system terminal, outside of FreeCAD (Ctrl+Alt+t)
  2. Type the following command
freecad.pip install openpyxl

from billofmaterials-wb.

mwlandolsi avatar mwlandolsi commented on June 24, 2024

None of the above solutions worked for me!
[code]
OS: KDE Flatpak runtime (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.21.2.33771 (Git)
Build type: Release
Branch: (HEAD detached at b9bfa5c)
Hash: b9bfa5c5507506e4515816414cd27f4851d00489
Python 3.11.7, Qt 5.15.10, Coin 4.0.0, Vtk 8.2.0, OCC 7.6.3
Locale: English/United States (en_US)
Installed mods:

  • sheetmetal 0.4.2
  • frame 0.1.1
  • Movie 2023.6.10
  • Assembly3 0.12.0
  • Curves 0.6.13
  • 3DfindIT 1.2.0
  • lattice2 1.0.0
  • BillOfMaterials 0.0.5.7
  • Silk 0.1.5
  • freecad.gears 1.0.0
  • Render 2023.8.18
  • fasteners 0.4.67
    [/code]

from billofmaterials-wb.

APEbbers avatar APEbbers commented on June 24, 2024

I've maybe another option. Can you try to run the following from a terminal:

"C:\Program Files\FreeCAD 0.21\bin\python.exe" -m pip install openpyxl.

Change the path of course to where your FreeCAD is located
I just tried it on my laptop. In windows, but I think it should work in Linux as well.

from billofmaterials-wb.

Zolko-123 avatar Zolko-123 commented on June 24, 2024

I use openpyxl to convert letters to numbers and visa versa

do you absolutely need openpyxl for that ?

openpyxl - A Python library to read/write Excel 2010 xlsx/xlsm files ????

from billofmaterials-wb.

mwlandolsi avatar mwlandolsi commented on June 24, 2024

I use openpyxl to convert letters to numbers and visa versa

do you absolutely need openpyxl for that ?

openpyxl - A Python library to read/write Excel 2010 xlsx/xlsm files ????

But it shows an error when selecting the WB! I wonder if it is necessary to run the WB?

from billofmaterials-wb.

APEbbers avatar APEbbers commented on June 24, 2024

I'm planning to use it for future functions. I've also another workbench that depends heavily on it.
I find it strange that it causes these issues since this library is officially allowed by FreeCAD and is used with other WB like OSAFE for example.

Since I want to use it more, I'd like to understand why this occurs. I'll going to look into it futher this weekend.

from billofmaterials-wb.

furgo16 avatar furgo16 commented on June 24, 2024

@mwlandolsi: at this point, you might want to seek forum help to resolve your installation issue: https://forum.freecad.org/viewtopic.php?t=84982

[APEbbers]: However I know that there are some issues with snap. These are not specific for this WB as far as I can see.

I had no issues with snap, other than having to install the dependency manually.

[APEbbers]: I use openpyxl to convert letters to numbers and visa versa

[Zolko-123]: do you absolutely need openpyxl for that ?

If it's only used for letter to digit conversion, would it not be simpler from a maintenance and installation point of view to use plain Python now and adopt the library if and when the future functions are added? Just a thought, thanks a lot for releasing the workbench!

from billofmaterials-wb.

furgo16 avatar furgo16 commented on June 24, 2024

@APEbbers could it be because the package needs to be listed at https://github.com/FreeCAD/FreeCAD-addons/blob/master/ALLOWED_PYTHON_PACKAGES.txt? => already listed there, sorry for the noise

from billofmaterials-wb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.