fgsect/scat

Packaging dependency is missing on new python environments

Closed this issue · 2 comments

SUMMARY
SCAT installed through pip gives a module not found error. Specifically 'packaging' is missing.

STEPS TO REPRODUCE
Steps to reproduce the behavior:

  1. Install SCAT in a new python environment (I am making docker containers)
  2. Run SCAT using the qualcomm parser
  3. See error

EXPECTED and ACTUAL RESULT
Traceback (most recent call last):
File "/usr/local/bin/scat", line 5, in
from scat.main import scat_main
File "/usr/local/lib/python3.12/site-packages/scat/main.py", line 6, in
import scat.parsers
File "/usr/local/lib/python3.12/site-packages/scat/parsers/init.py", line 3, in
from scat.parsers.qualcomm.qualcommparser import QualcommParser
File "/usr/local/lib/python3.12/site-packages/scat/parsers/qualcomm/qualcommparser.py", line 9, in
from scat.parsers.qualcomm.diaggsmlogparser import DiagGsmLogParser
File "/usr/local/lib/python3.12/site-packages/scat/parsers/qualcomm/diaggsmlogparser.py", line 9, in
from packaging import version
ModuleNotFoundError: No module named 'packaging'

ENVIRONMENT

  • OS: Arch Linux running an Alpine Docker container
  • SCAT version: Master
  • Python version: 3.12.3
  • Cellular device: Not needed to see error but Quectel RM502
  • Baseband type: Qualcomm
  • DIAG method: serial

ADDITIONAL INFORMATION
I added packaging>=24.0 to the dependencies on pyproject.toml and that fixed the issue.

@peremen

I also encountered similar error ModuleNotFoundError: No module named 'packaging' while installing scat.

Can we make the following changes to scat/pyproject.toml ?

requires-python = ">=3.7"
dependencies = [
    "pyusb>=1.0.2",
    "pyserial>=3.3",
    "bitstring>=3.1.7",
    "packaging>=20.0"  # Added the packaging module here
]

Additional info: packaging


After checking repology I added an explicit dependency in the pyproject.toml file, and this should fix the issue.

@M0hanrajp you don't have to mention me in every issues.