Closed andrewgreenh closed 6 years ago
There seems to be a problem while trying to download the list of available packages.
First of all check your package configuration by launching Configure Package: PackageControl
in Keypirinha. Your repository
setting should be "https://ue.spdns.de/packagecontrol/packages.json" (default repository).
Can you confirm that you can reach https://ue.spdns.de/packagecontrol/packages.json ?
Do have any proxy settings that would prevent an application like keypirinha to reach this url?
Advanced: What happens when you execute
import keypirinha_net as kpn; kpn.build_urllib_opener().open("https://ue.spdns.de/packagecontrol/packages.json").status
in the Keypirinha Console?
This is the response I'm getting from the console:
>>> import keypirinha_net as kpn; kpn.build_urllib_opener().open("https://ue.spdns.de/packagecontrol/packages.json").status
200
So that seems to be working.
And i also got that URL in the configuration file.
Does the error reoccur if you run PackageControl: Update Repository List
in Keypirinha?
This is the result in the console when starting Update Repository List
13:01:09.705 ** ERROR: PackageControl.PackageControl: Available packages could not be obtained:
Traceback (most recent call last):
File "C:\Users\andreas\tools\Keypirinha\portable\Profile\InstalledPackages\PackageControl.keypirinha-package\packagecontrol.py", line 376, in _get_available_packages
File "lib\json\__init__.py", line 312, in loads
TypeError: the JSON object must be str, not 'bytes'
13:01:10.171 ** ERROR: PackageControl.PackageControl: Available packages could not be obtained:
Traceback (most recent call last):
File "C:\Users\andreas\tools\Keypirinha\portable\Profile\InstalledPackages\PackageControl.keypirinha-package\packagecontrol.py", line 376, in _get_available_packages
File "lib\json\__init__.py", line 312, in loads
TypeError: the JSON object must be str, not 'bytes'
13:01:10.171 ** ERROR: PackageControl.PackageControl: Error occurred while executing command 'PackageControl: Update Repository List'
Traceback (most recent call last):
File "C:\Users\andreas\tools\Keypirinha\portable\Profile\InstalledPackages\PackageControl.keypirinha-package\packagecontrol.py", line 220, in on_execute
File "C:\Users\andreas\tools\Keypirinha\portable\Profile\InstalledPackages\PackageControl.keypirinha-package\packagecontrol.py", line 291, in _check_installed
File "C:\Users\andreas\tools\Keypirinha\portable\Profile\InstalledPackages\PackageControl.keypirinha-package\packagecontrol.py", line 325, in _get_package
TypeError: 'NoneType' object is not iterable
I dont get it... Which version Keypirinha do you have? If you execute
import keypirinha_net as kpn; kpn.build_urllib_opener().open("https://ue.spdns.de/packagecontrol/packages.json").read()
does it dump the json in the console?
:/
Is it possible to execute those tasks from the console directly? I'm on Keypirinha 2.9.6
Okay, I am terribly sorry... somehow I though Keypirinha would update itself automatically... I updated to the newest version and now everything is working! Thanks a lot for your help!
Glad to hear it.
Funny... looking at the code it should not work because the json.loads() gets a bytes object rather than a string. In Python 3.6 there is some magic that autodetects the encoding decodes automatically. KP 2.9.6 probably has a Python version < 3.6 so it does not work there. (Issues https://bugs.python.org/issue10976 and https://bugs.python.org/issue27765)
Reopen: Adding backwards compatibility
FYI, KP 2.9.6 embeds CPython 3.5.1 IIRC.
Hello there!
I have been using Keypirinha for quite some time now and I really love the concept of this package! However, whenever I try to update an existing package or install a new one, the package seems to crash. The logs display this:
I'm using the portable version of keypirinha, is that a problem?