Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thonny unable to load packages #409

Closed
aivarannamaa opened this issue Mar 18, 2018 · 22 comments
Closed

Thonny unable to load packages #409

aivarannamaa opened this issue Mar 18, 2018 · 22 comments

Comments

@aivarannamaa
Copy link
Member

Original report by ericd13 (Bitbucket: ericd13
GitHub: ericd13
).


The problem comes from the package manager
When I select it, it shows the windows but next comme an "internal error" (see screen capture)
I've got the same problem on a linux mint XFCE (18.3) computer and a Windows 10 laptop

@aivarannamaa
Copy link
Member Author

Do you get this error when just opening the dialog or after you do something in it?

Have you previously installed anything with it?

@aivarannamaa
Copy link
Member Author

Original comment by ericd13 (Bitbucket: ericd13
GitHub: ericd13
).


I get this error whaen I open the dialog AND after I try to get something.
I had previously installed packages in it and they don't show in the dialog :(

@aivarannamaa
Copy link
Member Author

Original comment by ericd13 (Bitbucket: ericd13
GitHub: ericd13
).


I tried in a third computer : same problem. This one has 2.1.11 version, the other ones are 2.1.16

@aivarannamaa
Copy link
Member Author

Original comment by ericd13 (Bitbucket: ericd13
GitHub: ericd13
).


Could it be an internet problem : the package manager could try to read a corrupted file somewhere ?
The error message seems to speak about "extra data" somewhere.

@aivarannamaa
Copy link
Member Author

Which packages have you installed before?

And what do you mean by "after I try to get something" -- do you mean you try to search a package or something else?

@aivarannamaa
Copy link
Member Author

Original comment by ericd13 (Bitbucket: ericd13
GitHub: ericd13
).


  1. matplotlib and numpy were installed.
    After the apparition of the problems I erased thonny and re-installed it.
    With the same problem.

2 . Yes
I open "package manager" and get the internal error window.
I close the window then I look for a package (numpy, or another), the package manager propose it, I hit "Install"
The package manager loads it, install it (I believe) and then shows again the same internal error message.

This is the same message before and after on each computer

linux mint xfce 18.3

windows 10

debian stretch (with openbox)

@aivarannamaa
Copy link
Member Author

Original comment by Anilinn (Bitbucket: anilinn
).


I have the same problem.

@aivarannamaa
Copy link
Member Author

Original comment by MoiraGillespie (Bitbucket: MoiraGillespie
).


I'm having the same issue and getting an identical error. Was attempting to install the package for beautifulsoup and requests on windows 10. I removed python completely from my system and did a clean install of Thonny and the error still persists.

@aivarannamaa
Copy link
Member Author

Looks like the error is caused by the release of pip 9.0.2.

Older version of pip (the one included in Thonny) now shows the message about new version and this confuses Thonny.

Quickest workaround is to upgrade pip that Thonny is using. Select "Tools => Open system shell" and enter:

  • if you are using Windows: python -m pip install --upgrade pip
  • if you are using Mac or Linux: pip3 install --upgrade pip

Then restart Thonny and open the package manager again.

@aivarannamaa
Copy link
Member Author

The workaround applies to cases where you are using Thonny default backend/interpreter (built-in virtual environment). If you have reconfigured the interpreter, then you should consider other ways for upgrading pip (eg. using system package manager in Linux).

@aivarannamaa
Copy link
Member Author

Original comment by MoiraGillespie (Bitbucket: MoiraGillespie
).


That worked. Thank you very much, Aivar.

@aivarannamaa
Copy link
Member Author

Great! I'll try to publish new version in a week.

@aivarannamaa
Copy link
Member Author

FIXED #409: Get rid of pip new version notice

3dbfdf7

@aivarannamaa
Copy link
Member Author

Original changes by Aivar Annamaa (Bitbucket: aivarannamaa
GitHub: aivarannamaa
).


  • changed status to closed

@aivarannamaa
Copy link
Member Author

Original comment by ericd13 (Bitbucket: ericd13
GitHub: ericd13
).


Wonderful !!
Thonny is again the best !!!

@aivarannamaa
Copy link
Member Author

Issue #411 was marked as a duplicate of this issue.

@aivarannamaa
Copy link
Member Author

New version (2.1.17), which fixes this problem, is now available on Thonny's homepage.

@aivarannamaa
Copy link
Member Author

Original comment by uday kiran (Bitbucket: udaykiran701
).


I had a new version of pip but still it is showing internal error after I installed matplotlib.
I even tried uninstalling and again installing matplotlib but of no use.

@aivarannamaa
Copy link
Member Author

Do you get same error?

@aivarannamaa
Copy link
Member Author

Original comment by uday kiran (Bitbucket: udaykiran701
).


%Run temp.py
Traceback (most recent call last):
File "C:\Users\DELL.thonny\Python35\lib\site-packages\matplotlib\font_manager.py", line 1353, in
fontManager = json_load(_fmcache)
File "C:\Users\DELL.thonny\Python35\lib\site-packages\matplotlib\font_manager.py", line 888, in json_load
with open(filename, 'r') as fh:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\DELL\.matplotlib\fontlist-v300.json'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\DELL.spyder-py3\temp.py", line 11, in
import matplotlib.pyplot as plt
File "C:\Users\DELL.thonny\Python35\lib\site-packages\matplotlib\pyplot.py", line 32, in
import matplotlib.colorbar
File "C:\Users\DELL.thonny\Python35\lib\site-packages\matplotlib\colorbar.py", line 32, in
import matplotlib.contour as contour
File "C:\Users\DELL.thonny\Python35\lib\site-packages\matplotlib\contour.py", line 18, in
import matplotlib.font_manager as font_manager
File "C:\Users\DELL.thonny\Python35\lib\site-packages\matplotlib\font_manager.py", line 1363, in
_rebuild()
File "C:\Users\DELL.thonny\Python35\lib\site-packages\matplotlib\font_manager.py", line 1344, in _rebuild
fontManager = FontManager()
File "C:\Users\DELL.thonny\Python35\lib\site-packages\matplotlib\font_manager.py", line 978, in init
ttffiles = findSystemFonts(paths) + findSystemFonts()
File "C:\Users\DELL.thonny\Python35\lib\site-packages\matplotlib\font_manager.py", line 264, in findSystemFonts
fontfiles.update(win32InstalledFonts(fontext=fontext))
TypeError: 'NoneType' object is not iterable

@aivarannamaa
Copy link
Member Author

Original comment by uday kiran (Bitbucket: udaykiran701
).


above error and an internal error

@aivarannamaa
Copy link
Member Author

Did you get this error while installing matplotlib or when you tried to use it in your program?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant