Reference
Errors and fixes¶
What each error and warning means, and how to fix it.
Errors¶
| Error | Raised when | Fix |
|---|---|---|
StyleSyntaxError |
an unknown utility, a bad colour, an unbalanced bracket, two words setting the same thing, a ramp or scheme without a data fill, a categorical ramp with a numeric scheme | read the suggestion; the error shows the word and its position |
BindingError |
a column is missing, not numeric where a number is needed, or the data has no CRS | the error lists the closest column names; set a CRS with gdf.set_crs(...) |
CardStyleError |
a word in title_style or legend_style that kharita does not know |
the error suggests the closest word |
ValueError |
a bad keyword: an unknown legend option, basemap, shape, imagery year, contour detail | the message lists the accepted values |
Warnings¶
| Warning says | Means |
|---|---|
| stores numbers as text; kharita converted them | a column of text digits was read as numbers |
| rows divide by zero; shown as no data | a ratio's denominator is zero for some rows |
| has only N whole-number values; if they are codes ... add scheme-cat | small integers often mean classes, not amounts |
| Tied values ... allow only N quantile classes | too many equal values for that many quantiles |
| negative values get no circle, width or height | sizes, widths and heights need positive values |
| rows have no geometry and are not drawn | empty or missing geometries |
| rows of type ... are not drawn; explode them | geometry collections; use gdf.explode() |
| the colour for a class is almost the basemap's ground | that class may vanish; change the ramp or land- |
| glow adds colours together ... on a light basemap | use a dark theme with glow |
| dash- applies to lines and outlines | dashes do nothing on points |
| mask- needs polygons | masks cut out polygons only |
| label-[...] adds N labels | more than 5,000 labels; the map hides overlaps |
| no value 'x'; its colour or position is not used | a key in colors= or order= is not in the data |
The map is blank¶
- No internet: basemaps and tiles stream from open servers.
- The data's CRS is wrong: check
gdf.crsand the coordinates. - In JupyterLab, update kharita: older versions drew the title and legend above the map.