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

Cannot install flatpak-node-generator #359

Open
zadam opened this issue May 19, 2023 · 4 comments
Open

Cannot install flatpak-node-generator #359

zadam opened this issue May 19, 2023 · 4 comments

Comments

@zadam
Copy link

zadam commented May 19, 2023

flatpak-builder version

1.2.3

Linux distribution and version

Ubuntu 23.04

Affected flatpak-builder tool

node/flatpak-node-generator.py

flatpak-builder tool cli args

No response

Source repository URL

No response

Flatpak-builder manifest URL

No response

Description

Hi, the recommended way to install flatpak-node-generator is this (in the clone repository):

$ pipx install .

But it just errors out:

~/tmp/flatpak-builder-tools/node$ pipx install .
Traceback (most recent call last):
File "/usr/bin/pipx", line 8, in <module>
sys.exit(cli())
^^^^^
File "/usr/lib/python3/dist-packages/pipx/main.py", line 819, in cli
return run_pipx_command(parsed_pipx_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/pipx/main.py", line 202, in run_pipx_command
return commands.install(
^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/pipx/commands/install.py", line 30, in install
package_name = package_name_from_spec(
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/pipx/commands/common.py", line 333, in package_name_from_spec
package_name = venv.install_package_no_deps(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/pipx/venv.py", line 268, in install_package_no_deps
old_package_set = self.list_installed_packages()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/pipx/venv.py", line 348, in list_installed_packages
pip_list = json.loads(cmd_run.stdout.strip())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

The error is not particularly helpful, does anyone know what might be the problem?

@zadam zadam added the bug label May 19, 2023
@refi64
Copy link
Collaborator

refi64 commented May 19, 2023

This sounds a bit like your pip installation might be a bit broken, so it's failing to print the JSON output that pipx expects. If you pass --verbose to pipx, you can see what command it's running that's failing, and then run it yourself to inspect the output.

@zadam
Copy link
Author

zadam commented May 20, 2023

Thanks, that helped track it down a bit. Found pypa/pipx#393 and pypa/pipx#386

I uninstalled pipx, rm -r ~/.local/pipx, installed pipx again and it started working.

@zadam zadam closed this as completed May 20, 2023
@hadess
Copy link
Contributor

hadess commented Dec 1, 2023

Ran into this as well, this should be mentioned in the README.

@hadess hadess reopened this Dec 1, 2023
@hadess
Copy link
Contributor

hadess commented Dec 1, 2023

I uninstalled pipx, rm -r ~/.local/pipx, installed pipx again and it started working.

I just rm -rf ~/.local/pipx to work-around the problem.

@hfiguiere hfiguiere added the node label Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants