community-maps-2 icon indicating copy to clipboard operation
community-maps-2 copied to clipboard

Deprecation warning when running checkrefs.py

Open andy5995 opened this issue 5 months ago • 0 comments

checkrefs.py exits with 1 when checking mods in PRs and when merged to master

Run ERRLOG="${GITHUB_WORKSPACE}/errlog.txt"
  ERRLOG="${GITHUB_WORKSPACE}/errlog.txt"
  cd "$GITHUB_WORKSPACE/0ad_directory/source/tools/entity" || exit 1
  python3 ./checkrefs.py -m "$GITHUB_WORKSPACE/community_maps_2_directory" -tax 2> $ERRLOG
  LOG_CONTENTS=$(cat $ERRLOG)
  [[ -z "$LOG_CONTENTS" ]] && exit 0
  echo $LOG_CONTENTS && exit 1
  shell: /usr/bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.12.1/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.1/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.1/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.1/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.1/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.1/x64/lib
INFO - Checking /home/runner/work/community-maps-2/community-maps-2/community_maps_2_directory's integrity.
INFO - The following mods will be loaded: /home/runner/work/community-maps-2/community-maps-2/community_maps_2_directory|public|mod.
INFO - Loading maps XML...
INFO - Loading maps PMP...
INFO - Loading entities...
INFO - Loading actors...
INFO - Loading variants...
INFO - Loading art files...
INFO - Loading materials...
INFO - Loading particles...
INFO - Loading sound groups...
INFO - Loading audio files...
INFO - Loading GUI XML...
INFO - Loading GUI data...
INFO - Loading civs...
INFO - Loading random maps...
INFO - Loading techs...
INFO - Loading terrains...
INFO - Loading auras...
INFO - Loading tips...
INFO - Looking for missing files...
INFO - Validating actors...
INFO - Validating variants...
INFO - Validating gui files...
INFO - Validating maps...
INFO - Validating materials...
INFO - Validating particles...
INFO - Validating simulation...
INFO - Validating soundgroups...
INFO - Validating terrains...
INFO - Validating textures...
INFO - Collecting materials...
INFO - Collecting actors...
 INFO - Validating textures...
/home/runner/work/community-maps-2/community-maps-2/0ad_directory/source/tools/entity/./checkrefs.py:237: DeprecationWarning: Testing an element's truth value will raise an exception in future versions. Use specific 'len(elem)' or 'elem is not None' test instead. if entity and entity.find('VisualActor') is not None and entity.find('VisualActor').find('Actor') is not None: /home/runner/work/community-maps-2/community-maps-2/0ad_directory/source/tools/entity/./checkrefs.py:238: DeprecationWarning: Testing an element's truth value will raise an exception in future versions. Use specific 'len(elem)' or 'elem is not None' test instead. if entity.find('Identity'): /home/runner/work/community-maps-2/community-maps-2/0ad_directory/source/tools/entity/./checkrefs.py:253: DeprecationWarning: Testing an element's truth value will raise an exception in future versions. Use specific 'len(elem)' or 'elem is not None' test instead. if entity.find('Sound'): /home/runner/work/community-maps-2/community-maps-2/0ad_directory/source/tools/entity/./checkrefs.py:251: DeprecationWarning: Testing an element's truth value will raise an exception in future versions. Use specific 'len(elem)' or 'elem is not None' test instead. if foundation_actor: /home/runner/work/community-maps-2/community-maps-2/0ad_directory/source/tools/entity/./checkrefs.py:409: DeprecationWarning: Testing an element's truth value will raise an exception in future versions. Use specific 'len(elem)' or 'elem is not None' test instead. if texture:

andy5995 avatar Jan 27 '24 22:01 andy5995