Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: can't multiply sequence by non-int of type 'Forward' #876

Closed
eylenburg opened this issue Mar 7, 2024 · 2 comments
Closed

TypeError: can't multiply sequence by non-int of type 'Forward' #876

eylenburg opened this issue Mar 7, 2024 · 2 comments
Labels
bug This is a bug, and should be fixed

Comments

@eylenburg
Copy link

Current Behavior

Hi, I am the creator of the Flatpak version on Flathub (https://flathub.org/apps/net.puddletag.puddletag) and wanted to update Puddletag to the newest version. In my manifest, I updated all the dependencies to the newest version and added unidecode as a new dependency.

Puddletag seems to build fine, but when I start it it won't start and I just get this error:

Traceback (most recent call last):
  File "/app/bin/puddletag", line 352, in <module>
    from puddlestuff.puddletag import MainWin
  File "/app/lib/python3.11/site-packages/puddlestuff/puddletag.py", line 14, in <module>
    from . import mainwin
  File "/app/lib/python3.11/site-packages/puddlestuff/mainwin/__init__.py", line 4, in <module>
    from . import dirview
  File "/app/lib/python3.11/site-packages/puddlestuff/mainwin/dirview.py", line 12, in <module>
    from ..tagmodel import has_previews
  File "/app/lib/python3.11/site-packages/puddlestuff/tagmodel.py", line 32, in <module>
    from .audio_filter import parse as filter_audio
  File "/app/lib/python3.11/site-packages/puddlestuff/audio_filter.py", line 183, in <module>
    bool_expr.enablePackrat()
  File "/app/lib/python3.11/site-packages/pyparsing/util.py", line 265, in _inner
    return fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/pyparsing/core.py", line 1132, in enable_packrat
    ParserElement.packrat_cache = _FifoCache(cache_size_limit)  # type: ignore[assignment]
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/pyparsing/util.py", line 105, in __init__
    keyring = [object()] * size
              ~~~~~~~~~~~^~~~~~
TypeError: can't multiply sequence by non-int of type 'Forward'

Could you please help me with this or point me to the right direction?

Expected Behavior

Flatpak should run like the previous version 2.2.0 does

Steps To Reproduce

This is my Flatpak manifest:

app-id: net.puddletag.puddletag

runtime: org.kde.Platform
runtime-version: '5.15-23.08'
sdk: org.kde.Sdk
base: com.riverbankcomputing.PyQt.BaseApp
base-version: 5.15-23.08

command: puddletag
rename-desktop-file: puddletag.desktop
rename-icon: puddletag

finish-args:
  - --device=dri
  - --filesystem=xdg-music
  - --filesystem=xdg-download
  - --share=ipc
  - --socket=fallback-x11
  - --socket=pulseaudio
  - --socket=wayland

build-options:
  env:
    - BASEAPP_REMOVE_WEBENGINE=1
cleanup-commands:
  - /app/cleanup-BaseApp.sh

modules:
  - name: python3-configobj
    buildsystem: simple
    build-commands:
      - pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}" --prefix=${FLATPAK_DEST} "configobj" --no-build-isolation
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/cb/87/17d4c6d634c044ab08b11c0cd2a8a136d103713d438f8792d7be2c5148fb/configobj-5.0.8.tar.gz
        sha256: 6f704434a07dc4f4dc7c9a745172c1cad449feb548febd9f7fe362629c627a97
        x-checker-data:
          type: pypi
          name: configobj

  - name: python3-mutagen
    buildsystem: simple
    build-commands:
      - pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}"
        --prefix=${FLATPAK_DEST} "mutagen" --no-build-isolation
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/81/e6/64bc71b74eef4b68e61eb921dcf72dabd9e4ec4af1e11891bbd312ccbb77/mutagen-1.47.0.tar.gz
        sha256: 719fadef0a978c31b4cf3c956261b3c58b6948b32023078a2117b1de09f0fc99
        x-checker-data:
          type: pypi
          name: mutagen

  - name: python3-pillow
    buildsystem: simple
    build-commands:
      - pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}" --prefix=${FLATPAK_DEST} "pillow" --no-build-isolation
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/f8/3e/32cbd0129a28686621434cbf17bb64bf1458bfb838f1f668262fefce145c/pillow-10.2.0.tar.gz
        sha256: e87f0b2c78157e12d7686b27d63c070fd65d994e8ddae6f328e0dcf4a0cd007e
        x-checker-data:
          type: pypi
          name: pillow

  - name: python3-unidecode
    buildsystem: simple
    build-commands:
      - pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}" --prefix=${FLATPAK_DEST} "unidecode" --no-build-isolation
    sources:
      - type: file
        url: https://files.pythonhosted.org/packages/f7/89/19151076a006b9ac0dd37b1354e031f5297891ee507eb624755e58e10d3e/Unidecode-1.3.8.tar.gz
        sha256: cfdb349d46ed3873ece4586b96aa75258726e2fa8ec21d6f00a591d98806c2f4
        x-checker-data:
          type: pypi
          name: unidecode

  - name: puddletag
    buildsystem: simple
    build-commands:
      - python3 setup.py build
      - python3 setup.py install --skip-build --prefix=${FLATPAK_DEST} --root=/ --optimize=1
      - install -Dm644 /app/share/{pixmaps,icons/hicolor/256x256/apps}/puddletag.png
      - install -D -m 644 ${FLATPAK_ID}.appdata.xml /app/share/metainfo/${FLATPAK_ID}.metainfo.xml
      - rm -r /app/share/pixmaps
    sources:
      - type: archive
        url: https://github.com/puddletag/puddletag/archive/refs/tags/2.3.0.tar.gz
        sha256: 088860de9cfe91b761c95909d27ab763c9b9cbd30fd0f5e6cedf807cfb929bdd
        x-checker-data:
          type: anitya
          project-id: 3727
          stable-only: true
          url-template: https://github.com/puddletag/puddletag/archive/refs/tags/$version.tar.gz
      - type: file
        path: net.puddletag.puddletag.appdata.xml

  - name: chromaprint
    buildsystem: cmake-ninja
    sources:
      - type: archive
        url: https://github.com/acoustid/chromaprint/releases/download/v1.5.1/chromaprint-1.5.1.tar.gz
        sha256: a1aad8fa3b8b18b78d3755b3767faff9abb67242e01b478ec9a64e190f335e1c
        x-checker-data:
          type: anitya
          project-id: 286
          stable-only: true
          url-template: https://github.com/acoustid/chromaprint/releases/download/v$version/chromaprint-$version.tar.gz

Information about your system

Puddletag: 2.3.0
OS: openSUSE Tumbleweed
Python:
PyQt:

Anything else?

No response

@eylenburg eylenburg added the bug This is a bug, and should be fixed label Mar 7, 2024
@corubba
Copy link
Contributor

corubba commented Mar 8, 2024

This happens with the recently released pyparsing v3.1.2, where their pre-PEP-8 compat wrapper passes on wrong args. Works fine with v3.1.1 though. So technically not a puddletag issue, please raise this issue with the pyparsing devs.

However, this is probably a good trigger to revisit and implement #695, so we don't rely on/use that compat wrapper. It will start throwing deprecation warnings with v3.2.0 anyway. And Debian 12 "bookworm" ships pyparsing v3, so we are probably save on the distro front now.

@eylenburg
Copy link
Author

Thank you, I reported that to Pyparsing. For now I'll just keep the older runtime as it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This is a bug, and should be fixed
Projects
None yet
Development

No branches or pull requests

2 participants