CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.65k stars 4.18k forks source link

The tool tileset_coverage.py fails #64029

Closed mdtrooper closed 1 year ago

mdtrooper commented 1 year ago

Describe the bug

I followed the example (it was wrote at the head into the file tileset_coverage.py) to get the tileset coverage.

And it is fails.

$ python3 tools/gfx_tools/tileset_coverage.py \ all_game_ids.csv all_overlay_ids.csv tileset_ids.csv \ tileset_coverage_output.csv /tmp/Cataclysm-DDA/tools/gfx_tools/tileset_coverage.py:94: FutureWarning: The warn_bad_lines argument has been deprecated and will be removed in a future version. Use on_bad_lines in the future.

all_game_ids = pandas.read_csv( /tmp/Cataclysm-DDA/tools/gfx_tools/tileset_coverage.py:98: FutureWarning: The warn_bad_lines argument has been deprecated and will be removed in a future version. Use on_bad_lines in the future.

overlay_ids = pandas.read_csv( /tmp/Cataclysm-DDA/tools/gfx_tools/tileset_coverage.py:104: FutureWarning: The warn_bad_lines argument has been deprecated and will be removed in a future version. Use on_bad_lines in the future.

tileset_ids = pandas.read_csv( Traceback (most recent call last): File "/tmp/Cataclysm-DDA/tools/gfx_tools/tileset_coverage.py", line 216, in merge_datasets( File "/tmp/Cataclysm-DDA/tools/gfx_tools/tileset_coverage.py", line 168, in merge_datasets result = all_game_ids.merge( File "/home/panacea/.local/lib/python3.10/site-packages/pandas/core/frame.py", line 10090, in merge return merge( File "/home/panacea/.local/lib/python3.10/site-packages/pandas/core/reshape/merge.py", line 110, in merge op = _MergeOperation( File "/home/panacea/.local/lib/python3.10/site-packages/pandas/core/reshape/merge.py", line 703, in init ) = self._get_merge_keys() File "/home/panacea/.local/lib/python3.10/site-packages/pandas/core/reshape/merge.py", line 1179, in _get_merge_keys left_keys.append(left._get_label_or_level_values(lk)) File "/home/panacea/.local/lib/python3.10/site-packages/pandas/core/generic.py", line 1850, in _get_label_or_level_values raise KeyError(key) KeyError: 'id'

Attach save file

N/A

Steps to reproduce

(Copy & Paste the example in the file tileset_coverage.py)

cd Cataclysm-DDA

python3 tools/json_tools/table.py -f csv --nonestring ""\
 --tileset type id name description color looks_like "copy-from" longest_side \
 > all_game_ids.csv

python3 tools/gfx_tools/list_tileset_ids.py gfx/UltimateCataclysm \
 > tileset_ids.csv

python3 tools/json_tools/generate_overlay_ids.py \
 > all_overlay_ids.csv

python3 tools/gfx_tools/tileset_coverage.py \
 all_game_ids.csv all_overlay_ids.csv tileset_ids.csv \
 tileset_coverage_output.csv

Expected behavior

Get the coverage of tileset.

Screenshots

No response

Versions and configuration

Python version:

$ python3 --version
Python 3.10.6

Pip packages (and versions):

$ pip3 list
Package               Version
--------------------- --------------
anyio                 3.6.2
apt-clone             0.2.1
apturl                0.5.2
argon2-cffi           21.3.0
argon2-cffi-bindings  21.2.0
asttokens             2.0.8
async-generator       1.10
attrs                 22.1.0
Babel                 2.11.0
backcall              0.2.0
beautifulsoup4        4.10.0
bleach                5.0.1
blinker               1.4
Brlapi                0.8.3
ccsm                  0.9.14.1
certifi               2022.12.7
cffi                  1.15.1
chardet               4.0.0
charset-normalizer    3.0.0
click                 8.0.3
colorama              0.4.4
coloredlogs           15.0.1
command-not-found     0.3
commonmark            0.9.1
compizconfig-python   0.9.14.1
configobj             5.0.6
contourpy             1.0.6
crudini               0.9.3
cryptography          39.0.0
cupshelpers           1.0
cycler                0.11.0
dbus-python           1.2.18
debugpy               1.6.3
decorator             5.1.1
defer                 1.0.6
defusedxml            0.7.1
deprecation           2.1.0
distro                1.7.0
dnspython             2.1.0
entrypoints           0.4
exceptiongroup        1.1.0
executing             1.1.1
eyeD3                 0.8.10
fastjsonschema        2.16.2
filelock              3.6.0
Flask                 2.2.2
fonttools             4.38.0
glcontext             2.3.7
gpg                   1.16.0-unknown
grpcio                1.30.2
h11                   0.14.0
httpie                3.2.1
httplib2              0.20.2
humanfriendly         10.0
idna                  3.3
ifaddr                0.1.7
imageio               2.24.0
IMDbPY                2021.4.18
img2pdf               0.4.4
importlib-metadata    4.6.4
imutils               0.5.4
iniparse              0.4
ipykernel             6.17.0
ipython               8.5.0
ipython-genutils      0.2.0
itsdangerous          2.1.2
jedi                  0.18.1
jeepney               0.7.1
Jinja2                3.1.2
json5                 0.9.10
jsonschema            4.17.0
jupyter_client        7.4.4
jupyter_core          4.11.2
jupyter-server        1.23.0
jupyterlab            3.5.0
jupyterlab-pygments   0.2.2
jupyterlab_server     2.16.2
keyring               23.5.0
kiwisolver            1.4.4
launchpadlib          1.10.16
lazr.restfulclient    0.14.4
lazr.uri              1.0.6
louis                 3.20.0
lxml                  4.8.0
Mako                  1.1.3
Markdown              3.3.6
MarkupSafe            2.1.2
matplotlib            3.6.2
matplotlib-inline     0.1.6
meld                  3.20.4
mistune               2.0.4
moderngl              5.7.4
more-itertools        8.10.0
multidict             6.0.2
nbclassic             0.4.8
nbclient              0.7.0
nbconvert             7.2.3
nbformat              5.7.0
nest-asyncio          1.5.6
netaddr               0.8.0
netifaces             0.11.0
networkx              3.0
notebook              6.5.2
notebook_shim         0.2.2
notify2               0.3
numpy                 1.21.5
oauthlib              3.2.0
ocrmypdf              14.0.2
onboard               1.4.1
opencv-python         4.7.0.68
outcome               1.2.0
packaging             21.3
pandas                1.5.2
pandocfilters         1.5.0
parso                 0.8.3
pdfminer.six          20221105
pexpect               4.8.0
pickleshare           0.7.5
pikepdf               6.2.8.post1
Pillow                9.0.1
pip                   22.3.1
pluggy                1.0.0
prometheus-client     0.15.0
prompt-toolkit        3.0.31
protobuf              3.12.4
psutil                5.9.0
ptyprocess            0.7.0
pure-eval             0.2.2
pycairo               1.20.1
pycparser             2.21
pycups                2.0.1
pycurl                7.44.1
pyelftools            0.27
pygame                2.1.2
Pygments              2.11.2
PyGObject             3.42.1
PyICU                 2.8.1
PyJWT                 2.3.0
pymacaroons           0.13.0
PyNaCl                1.5.0
pyparsing             2.4.7
pyparted              3.11.7
PyPDF2                3.0.1
PyQt5                 5.15.6
PyQt5-sip             12.9.1
pyrsistent            0.19.2
PySocks               1.7.1
python-apt            2.4.0+ubuntu1
python-dateutil       2.8.2
python-debian         0.1.43ubuntu1
python-magic          0.4.24
python-xapp           2.2.2
python-xlib           0.29
pytz                  2022.6
pyvips                2.2.1
PyWavelets            1.4.1
pyxdg                 0.27
PyYAML                5.4.1
pyzmq                 24.0.1
reportlab             3.6.8
requests              2.25.1
requests-file         1.5.1
requests-toolbelt     0.9.1
requests-unixsocket   0.2.0
rich                  12.6.0
rise                  5.7.1
scikit-image          0.19.3
scipy                 1.10.0
scour                 0.38.2
scrap-engine          1.4.0
SecretStorage         3.3.1
selenium              4.7.2
Send2Trash            1.8.0
setproctitle          1.2.2
setuptools            66.1.1
simplejson            3.17.6
six                   1.16.0
sniffio               1.3.0
sortedcontainers      2.4.0
soupsieve             2.3.1
stack-data            0.5.1
systemd-python        234
terminado             0.17.0
terminator            2.1.1
tifffile              2022.10.10
tinycss2              1.2.1
tldextract            3.1.2
tomli                 2.0.1
torbrowser-launcher   0.3.3
tornado               6.2
tqdm                  4.64.1
traitlets             5.5.0
trio                  0.22.0
trio-websocket        0.9.2
ubuntu-drivers-common 0.0.0
ufw                   0.36.1
Unidecode             1.3.3
urllib3               1.26.5
urwid                 2.1.2
vboxapi               1.0
wadllib               1.3.6
wcwidth               0.2.5
webencodings          0.5.1
websocket-client      1.4.2
Werkzeug              2.2.2
wheel                 0.37.1
wsproto               1.2.0
xdg                   5
xkit                  0.0.0
youtube-dl            2021.12.17
zipp                  1.0.0

[notice] A new release of pip available: 22.3.1 -> 23.0.1
[notice] To update, run: python3 -m pip install --upgrade pip

Other info:

$ uname -a
Linux portatil 5.19.0-35-generic #36~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Feb 17 15:17:25 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Linuxmint
Description:    Linux Mint 21
Release:    21
Codename:   vanessa

Additional context

No response

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not bump or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.