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

Installation error in Python 3.9.5 #173

Closed
sw-dev-code opened this issue Oct 1, 2023 · 3 comments
Closed

Installation error in Python 3.9.5 #173

sw-dev-code opened this issue Oct 1, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@sw-dev-code
Copy link

Issue type

Build/Install

How did you install PythonMonkey?

Installed from pip

OS platform and distribution

Linux Ubuntu 20.04 LTS (Focal Fossa)

Python version (python --version)

3.9.5

PythonMonkey version (pip show pythonmonkey)

No response

Bug Description

There is a problem with the installation of PythonMonkey module using PIP. When I run python3 -m pip install pythonmonkey the following error occurs:

Collecting pythonmonkey
  Using cached pythonmonkey-0.2.1.tar.gz (112 kB)
ERROR: Exception:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 186, in _main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/_internal/commands/install.py", line 357, in run
    resolver.resolve(requirement_set)
  File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 177, in resolve
    discovered_reqs.extend(self._resolve_one(requirement_set, req))
  File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 333, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 282, in _get_abstract_dist_for
    abstract_dist = self.preparer.prepare_linked_requirement(req)
  File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 515, in prepare_linked_requirement
    abstract_dist = _get_prepared_distribution(
  File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 95, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(finder, build_isolation)
  File "/usr/lib/python3/dist-packages/pip/_internal/distributions/sdist.py", line 33, in prepare_distribution_metadata
    self.req.load_pyproject_toml()
  File "/usr/lib/python3/dist-packages/pip/_internal/req/req_install.py", line 512, in load_pyproject_toml
    pyproject_toml_data = load_pyproject_toml(
  File "/usr/lib/python3/dist-packages/pip/_internal/pyproject.py", line 75, in load_pyproject_toml
    pp_toml = toml.load(f)
  File "/usr/share/python-wheels/toml-0.10.0-py2.py3-none-any.whl/toml/decoder.py", line 134, in load
    return loads(f.read(), _dict, decoder)
  File "/usr/share/python-wheels/toml-0.10.0-py2.py3-none-any.whl/toml/decoder.py", line 455, in loads
    ret = decoder.load_line(line, currentlevel, multikey,
  File "/usr/share/python-wheels/toml-0.10.0-py2.py3-none-any.whl/toml/decoder.py", line 725, in load_line
    value, vtype = self.load_value(pair[1], strictly_valid)
  File "/usr/share/python-wheels/toml-0.10.0-py2.py3-none-any.whl/toml/decoder.py", line 802, in load_value
    return (self.load_array(v), "array")
  File "/usr/share/python-wheels/toml-0.10.0-py2.py3-none-any.whl/toml/decoder.py", line 914, in load_array
    a[b] = a[b] + ',' + a[b + 1]
IndexError: list index out of range

I've also tried the same on RPi4 with Raspbian OS and got the same result. Python version is 3.9 also.

Standalone code to reproduce the issue

No response

Relevant log output or backtrace

No response

Additional info if applicable

No response

What branch of PythonMonkey were you developing on? (If applicable)

No response

@wiwichips
Copy link
Collaborator

wiwichips commented Oct 1, 2023

Thank you so much for filing this issue @sw-dev-code , we're taking a look at it and we'll get back to you.

Note: came across this issue filed for toml that might be related: uiri/toml#270 perhaps since we're using poetry which is known to have this bug? python-poetry/poetry#7094

@wiwichips wiwichips added the bug Something isn't working label Oct 19, 2023
@philippedistributive
Copy link
Collaborator

Please try
python3 -m pip install pythonmonkey --no-cache-dir

If still try to use pythonmonkey-0.2.1.tar.gz please provide more information about your system

@sw-dev-code
Copy link
Author

@philippedistributive the latest version 0.3.0 is working fine. Thanks. Closing the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants