Coder Social home page Coder Social logo

Comments (9)

vmario89 avatar vmario89 commented on July 17, 2024

Hi,
can you ensure that boxes installed properly? Maybe it skipped installing due to some error reason?

you can check by

pip list installed | grep boxes

from mightyscape-1.2.

dido77-arduino avatar dido77-arduino commented on July 17, 2024

Hi @vmario89

actually no, it was not installed - I was assuming it was part of the requirements.txt, my bad.

I have now tried to install it, but it does not sound to me right

pip install boxes --no-cache-dir
Collecting boxes
  Downloading boxes-0.0.0.tar.gz (7.8 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: boxes
  Building wheel for boxes (setup.py) ... done
  Created wheel for boxes: filename=boxes-0.0.0-py2.py3-none-any.whl size=3111 sha256=bb45319bd050d01002096f3dff2e5f39b43837aed0a923373f972bea94cfc797
  Stored in directory: /tmp/pip-ephem-wheel-cache-a29pnob1/wheels/36/5e/21/04cf0e4703e07bb629c779f063126fb5a618b66d19071dfc38
Successfully built boxes
Installing collected packages: boxes
Successfully installed boxes-0.0.0

And actually boxes.py is empty

cat venv/lib64/python3.10/site-packages/boxes/boxes.py 
# -*- coding: utf-8 -*-

"""Main module."""

This is the full error

stderr: /home/didomax/.config/inkscape/extensions/mightyscape-1.2/extensions/fablabchemnitz/boxes.py/boxes/scripts/boxes:21: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  from pkg_resources import get_distribution
Traceback (most recent call last):
  File "/home/didomax/.config/inkscape/extensions/mightyscape-1.2/extensions/fablabchemnitz/boxes.py/boxes/scripts/boxes", line 24, in <module>
    import boxes
ModuleNotFoundError: No module named 'boxes'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/didomax/.config/inkscape/extensions/mightyscape-1.2/extensions/fablabchemnitz/boxes.py/boxes/scripts/boxes", line 27, in <module>
    import boxes
  File "/home/didomax/.config/inkscape/extensions/mightyscape-1.2/extensions/fablabchemnitz/boxes.py/boxes/scripts/../boxes/__init__.py", line 32, in <module>
    from boxes import formats
  File "/home/didomax/.config/inkscape/extensions/mightyscape-1.2/extensions/fablabchemnitz/boxes.py/boxes/scripts/../boxes/formats.py", line 22, in <module>
    from boxes.drawing import SVGSurface, PSSurface, LBRN2Surface, Context
  File "/home/didomax/.config/inkscape/extensions/mightyscape-1.2/extensions/fablabchemnitz/boxes.py/boxes/scripts/../boxes/drawing.py", line 3, in <module>
    from affine import Affine
ModuleNotFoundError: No module named 'affine'

Which I do not understand, since python is able to find the libraries when called from command line.

Any clue what is going on?

Max

from mightyscape-1.2.

vmario89 avatar vmario89 commented on July 17, 2024

hi, you actually installed the wrong boxes module: https://pypi.org/project/boxes/

please try to install like the following command:

pip install git+https://github.com/florianfesti/boxes.git

then run

boxes

the output will be


boxes.py

Generate stencils for wooden boxes.

Usage:
  boxes <generator> [<args>...]
  boxes --list
  boxes (-h | --help)
  boxes --version

Options:
  -h --help     Show this screen.
  --version     Show version.
  --list        List available generators.

from mightyscape-1.2.

vmario89 avatar vmario89 commented on July 17, 2024

ps: i added the missing dependency in requirements.txt

from mightyscape-1.2.

dido77-arduino avatar dido77-arduino commented on July 17, 2024

Thanks for the prompt answer.

Some progress done, I can call boxes both from the command line and in the python (virtual) environment

$ boxes.py

Generate stencils for wooden boxes.

Usage:
  boxes <generator> [<args>...]
  boxes --list
  boxes (-h | --help)
  boxes --version

Options:
  -h --help     Show this screen.
  --version     Show version.
  --list        List available generators.

and

Python 3.11.7 (main, Jan  7 2024, 01:05:16) [GCC 13.2.1 20231216] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import boxes
>>> 

However, I get the very same error as in the previous post when trying to run the extension within inkscape. My preferences.xml

<group
     id="extensions"
     org.inkscape.output.png.inkscape.png_bitdepth="99"
     org.inkscape.output.png.inkscape.png_compression="6"
     org.inkscape.output.png.inkscape.png_antialias="2"
     python-interpreter="/home/didomax/venv/bin/python"

I do not know anymore where to look for issues...

from mightyscape-1.2.

vmario89 avatar vmario89 commented on July 17, 2024

looks like i will have to check it myself when using venv (actually never tried). Which OS are you running? Linux, Windows, ... ?

from mightyscape-1.2.

dido77-arduino avatar dido77-arduino commented on July 17, 2024

from mightyscape-1.2.

vmario89 avatar vmario89 commented on July 17, 2024

i tested the thing with venv and it can confirm the failure. but good news: most of plugins work really well with venv. i will change mightyscape documentation to use venv mainly because it does not mess with system libraries at all

from mightyscape-1.2.

vmario89 avatar vmario89 commented on July 17, 2024

finally fixed by c5e4801

from mightyscape-1.2.

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.