junzis / pyModeS

Python decoder for Mode S and ADS-B signals
GNU General Public License v3.0
546 stars 153 forks source link

IndexError: list index out of range #141

Open brauhausdc opened 1 year ago

brauhausdc commented 1 year ago

Got the following error when trying to install - system is a fairly updated Raspi-OS install, and has python3.9 on it. Any pointers would be appreciated. Did get it to install on a different machine, running ubuntu 22.04, but haven't been able to get it to actually give me any output using "modeslive --source net --connect [my-flight-aware-server-IPaddress] 30005 beast"

Was trying to install locally on the pi-aware server but get a Out of range error:


    a[b] = a[b] + ',' + a[b + 1]
IndexError: list index out of range

Full error:


pip3 install pyModeS 
Collecting pyModeS
  Using cached pymodes-2.15.tar.gz (63 kB)
ERROR: Exception:
Traceback (most recent call last):
  File "/usr/share/python-wheels/resolvelib-0.5.4-py2.py3-none-any.whl/resolvelib/resolvers.py", line 171, in _merge_into_criterion
    crit = self.state.criteria[name]
KeyError: 'pymodes'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 223, in _main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/_internal/cli/req_command.py", line 180, in wrapper
    return func(self, options, args)
  File "/usr/lib/python3/dist-packages/pip/_internal/commands/install.py", line 346, in run
    requirement_set = resolver.resolve(
  File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/resolver.py", line 122, in resolve
    self._result = resolver.resolve(
  File "/usr/share/python-wheels/resolvelib-0.5.4-py2.py3-none-any.whl/resolvelib/resolvers.py", line 453, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/usr/share/python-wheels/resolvelib-0.5.4-py2.py3-none-any.whl/resolvelib/resolvers.py", line 318, in resolve
    name, crit = self._merge_into_criterion(r, parent=None)
  File "/usr/share/python-wheels/resolvelib-0.5.4-py2.py3-none-any.whl/resolvelib/resolvers.py", line 173, in _merge_into_criterion
    crit = Criterion.from_requirement(self._p, requirement, parent)
  File "/usr/share/python-wheels/resolvelib-0.5.4-py2.py3-none-any.whl/resolvelib/resolvers.py", line 82, in from_requirement
    if not cands:
  File "/usr/share/python-wheels/resolvelib-0.5.4-py2.py3-none-any.whl/resolvelib/structs.py", line 124, in __bool__
    return bool(self._sequence)
  File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 99, in __bool__
    return any(self)
  File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/factory.py", line 239, in iter_index_candidates
    candidate = self._make_candidate_from_link(
  File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/factory.py", line 167, in _make_candidate_from_link
    self._link_candidate_cache[link] = LinkCandidate(
  File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/candidates.py", line 296, in __init__
    super(LinkCandidate, self).__init__(
  File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/candidates.py", line 144, in __init__
    self.dist = self._prepare()
  File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/candidates.py", line 222, in _prepare
    dist = self._prepare_distribution()
  File "/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/candidates.py", line 307, in _prepare_distribution
    return self._factory.preparer.prepare_linked_requirement(
  File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 480, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
  File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 523, in _prepare_linked_requirement
    dist = _get_prepared_distribution(
  File "/usr/lib/python3/dist-packages/pip/_internal/operations/prepare.py", line 88, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(finder, build_isolation)
  File "/usr/lib/python3/dist-packages/pip/_internal/distributions/sdist.py", line 34, 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.1-py2.py3-none-any.whl/toml/decoder.py", line 156, in load
    return loads(f.read(), _dict, decoder)
  File "/usr/share/python-wheels/toml-0.10.1-py2.py3-none-any.whl/toml/decoder.py", line 510, in loads
    ret = decoder.load_line(line, currentlevel, multikey,
  File "/usr/share/python-wheels/toml-0.10.1-py2.py3-none-any.whl/toml/decoder.py", line 777, in load_line
    value, vtype = self.load_value(pair[1], strictly_valid)
  File "/usr/share/python-wheels/toml-0.10.1-py2.py3-none-any.whl/toml/decoder.py", line 875, in load_value
    return (self.load_array(v), "array")
  File "/usr/share/python-wheels/toml-0.10.1-py2.py3-none-any.whl/toml/decoder.py", line 997, in load_array
    a[b] = a[b] + ',' + a[b + 1]
IndexError: list index out of range
xoolive commented 1 year ago

Could you upgrade your pip version and retry? If it still doesn't work, please copy paste your pip version here.

brauhausdc commented 1 year ago

Upgrading from the Debian/Rasp-Pi OS distributed: pip 20.3.4 from /usr/lib/python3/dist-packages/pip (python 3.9)

To : pip-23.0

appears to have fixed the issue — though also necessitated/facilitated upgrading numpy and a few other bits before pyModeS installed.

I used: python -m pip install --upgrade pip

To do the pip upgrade

And then just did: pip install pyModeS

To install things. Compiling took a while on the Pi, but seems to have worked.

As a side note, the “modeslive” command still doesn’t work for me — it doesn’t show any output save the frame and text at the top of the screen, but a home built simplistic client script using the module does — its based on the "Customize the streaming module” section of the docs. Would be lovely for modeslive to have a “-D” or “-v” for debug or verbose, or similar. Have tried both "modeslive --source net --connect localhost 30002 raw” and "modeslive --source net --connect localhost 30005 beast” neither produces any spots.

Thanks again for the help.

On Feb 5, 2023, at 1:58 PM, Xavier Olive @.***> wrote:

Could you upgrade your pip version and retry? If it still doesn't work, please copy paste your pip version here. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>