Skip to content

Crash running example #237

@Chryseus

Description

@Chryseus

Tried the map of orion example from the website and it produces the following error:

  File "/home/james/chart/chart.py", line 23, in <module>
    p.stars(where=[_.magnitude < 8], bayer_labels=True, where_labels=[_.magnitude < 5])
    ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/miniconda3/lib/python3.13/site-packages/starplot/profile.py", line 8, in wrapper
    result = func(*args, **kwargs)
  File "/opt/miniconda3/lib/python3.13/site-packages/starplot/styles/helpers.py", line 81, in wrapper
    return func(*args, **kwargs)
  File "/opt/miniconda3/lib/python3.13/site-packages/starplot/plotters/stars.py", line 310, in stars
    self._star_labels(
    ~~~~~~~~~~~~~~~~~^
        star_objects,
        ^^^^^^^^^^^^^
    ...<6 lines>...
        handler,
        ^^^^^^^^
    )
    ^
  File "/opt/miniconda3/lib/python3.13/site-packages/starplot/plotters/stars.py", line 109, in _star_labels
    if bayer_labels and bayer_desig and s.is_primary:
                                        ^^^^^^^^^^^^
  File "/opt/miniconda3/lib/python3.13/site-packages/starplot/models/star.py", line 96, in is_primary
    return not bool(self.ccdm) or self.ccdm.startswith("A")
                                  ^^^^^^^^^^^^^^^^^^^^
AttributeError: 'float' object has no attribute 'startswith'

It appears to have something to do with with bayer_labels, I tried turning it off which produces an image but there are many 'nan' labels:

Image
  • Starplot 0.20.1
  • Python 3.13.12
  • Matplotlib 3.10.8

Installed on Arch Linux, tried both system python venv and conda with same results, starplot setup has been run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions