Git Product home page Git Product logo

Comments (8)

VictorSeven avatar VictorSeven commented on May 18, 2024

I am also affected by this error (Ubuntu 16.04, with Jupyter Lab 3.3.2). Whenever I try just to import + start, I get an error that says FileNotFoundError: '/tmp/ipykernel_9442/XXXXXXXX.py' with numbers that change every time, so I guess it is some temporal file. A transparent windows appears, immediately closes, and the notebook prints this error (but the figure is drawn). Fresh installation from today, using just pip. Is there any workaround?

from pylustrator.

rgerum avatar rgerum commented on May 18, 2024

Oh I guess its a problem with jupyter lab. I only implemented it to work with jupyter notebook. It basically tries to look for the file into which to paste the code for saving and apparently does not find the file as it is not started from a file. I haven't worked with jupyter lab yet. I will look into that.

from pylustrator.

VictorSeven avatar VictorSeven commented on May 18, 2024

I guess the error is related to that, but there the problem is not limited to Jupyter Lab, since I tried also with Notebook (version 6.4.8) and I do receive the same error. The application works fine if I try to execute it from a python script, there is no problem.

from pylustrator.

rgerum avatar rgerum commented on May 18, 2024

Ah maybe it is then the bug #38 that was fixed in 225e208

You can try to install the current github version with

pip install git+https://github.com/rgerum/pylustrator

and see if the bug still persists.

from pylustrator.

VictorSeven avatar VictorSeven commented on May 18, 2024

I cannot say on the previous error because now it gives an entire different problem. EDIT: I'd say the problem comes from the way pip installs the thing, read below.

First, I had to run pip uninstall pylustrator before running the command you suggested because the version has not changed and it is still 1.1.2. This means that pip will not make any changes, so I had to uninstall first. After that I run pip install git+https://github.com/rgerum/pylustrator, installed without problem.

However, when I try to make import pylustrator now I have another error, let me paste the entire log here:

ModuleNotFoundError                       Traceback (most recent call last)
Input In [2], in <cell line: 1>()
----> 1 import pylustrator

File ~/anaconda3/lib/python3.8/site-packages/pylustrator/__init__.py:22, in <module>
      1 #!/usr/bin/env python
      2 # -*- coding: utf-8 -*-
      3 # __init__.py
   (...)
     19 # You should have received a copy of the GNU General Public License
     20 # along with Pylustrator. If not, see <http://www.gnu.org/licenses/>
---> 22 from .QtGuiDrag import initialize as start
     23 from .helper_functions import fig_text, add_axes, add_image, despine, changeFigureSize, mark_inset, VoronoiPlot, selectRectangle, mark_inset_pos, draw_from_point_to_bbox, draw_from_point_to_point, loadFigureFromFile, add_letter, add_letters
     24 from .QtGui import initialize as StartColorChooser

File ~/anaconda3/lib/python3.8/site-packages/pylustrator/QtGuiDrag.py:38, in <module>
     35 from .drag_helper import DragManager
     36 from .exception_swallower import swallow_get_exceptions
---> 38 from .components.qitem_properties import QItemProperties
     39 from .components.tree_view import MyTreeView
     40 from .components.align import Align

ModuleNotFoundError: No module named 'pylustrator.components'

I don't know where this is coming from. Thank you for your support!

EDIT: I have checked the files downloaded and the folder "components" is missing, which seems to be the problem. This is what I have in my Anaconda installation after running the pip install for the git repo:

(base) >> ~/anaconda3/lib/python3.8/site-packages/pylustrator$ ls
arc2bez.py           drag_helper.py          icons             lab_colormap.py  pyjack.py            QtGui.py
ax_rasterisation.py  exception_swallower.py  __init__.py       parse_svg.py     QLinkableWidgets.py  QtShortCuts.py
change_tracker.py    helper_functions.py     jupyter_cells.py  __pycache__      QtGuiDrag.py         snap.py

So it is either some misconfiguration of the repo that does not grab the latest version even with the pip install git+ is called,, or it is ignoring the folders for some reason.

EDIT 2: as a workaround if I manually git clone and then copy the contents of the pylustrator folder into the folder above, where pip installed pylustrator, everything works as expected. Anyway, I think this should be fixed and updated in the pip package itself because if not there will be a big amount of users finding a problem just out of the box.

from pylustrator.

rgerum avatar rgerum commented on May 18, 2024

Oh I forgot to add this subfolder to setup.py. I fixed this in commit 3137d5f. You can try the git+ installation again. And probably the --upgrade was missing from the pip install command I posted:

pip install git+https://github.com/rgerum/pylustrator --upgrade

from pylustrator.

VictorSeven avatar VictorSeven commented on May 18, 2024

I tried reinstalling and works like a charm. Thank you so so much!!. I would either update the pip packages soon or add a warning at the README so new users don't encounter this problem just after installation :)

from pylustrator.

rgerum avatar rgerum commented on May 18, 2024

I now published a new release. I hope this issue is now solved.

from pylustrator.

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.