Comments (8)
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.
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.
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.
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.
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.
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.
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.
I now published a new release. I hope this issue is now solved.
from pylustrator.
Related Issues (20)
- White screen HOT 3
- iPython support please HOT 1
- File Not Found HOT 6
- Feature request: loading and editing pickle-dumped figures HOT 2
- Error when importing HOT 2
- Preparing metadata error when doing pip install HOT 2
- Make the panels resizeable HOT 4
- Crash when resizing the main Figure HOT 7
- Is the load function able to load pdf figures? HOT 2
- `ImportError: cannot import name 'SubFigure' from 'matplotlib.figure`' HOT 3
- removal of auto save popup window HOT 5
- Misc `not found`, `not in list` errors HOT 2
- Better test coverage
- Can not Start Pylustrator HOT 8
- A tool to create insets
- `linestyle` should also accept tuples an not just strings HOT 1
- ModuleNotFoundError: No module named 'matplotlib.axes._subplots' HOT 2
- pylustrator not working in google colab HOT 2
- Issue with saving via pylustrator's Save As... menu on Windows HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pylustrator.