Skip to content

Commit

Permalink
Debian packaging: Add "python3-pymysql" to requirements
Browse files Browse the repository at this point in the history
This should fix the MySQL "database migrate" command on Ubuntu 18.04:

$ opensips-cli -x database migrate 2.4_to_3.0 opensips_2_4 opensips_new
Traceback (most recent call last):
  File "/usr/bin/opensips-cli", line 9, in <module>
    run_console()
  File "/usr/bin/opensips-cli", line 6, in run_console
    main.main()
  File "/usr/lib/python3/dist-packages/opensipscli/main.py", line 77, in main
    shell = cli.OpenSIPSCLIShell(args)
  File "/usr/lib/python3/dist-packages/opensipscli/cli.py", line 85, in __init__
    self.update_instance(cfg.current_instance)
  File "/usr/lib/python3/dist-packages/opensipscli/cli.py", line 161, in update_instance
    excl_mod = mod.__exclude__(mod)
  File "/usr/lib/python3/dist-packages/opensipscli/modules/database.py", line 328, in __exclude__
    return (not osdb.has_dialect(osdb.get_dialect(db_url)), None)
  File "/usr/lib/python3/dist-packages/opensipscli/db.py", line 690, in has_dialect
    sqlalchemy.create_engine('{}://'.format(dialect))
  File "/usr/lib/python3/dist-packages/sqlalchemy/engine/__init__.py", line 387, in create_engine
    return strategy.create(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/sqlalchemy/engine/strategies.py", line 80, in create
    dbapi = dialect_cls.dbapi(**dbapi_args)
  File "/usr/lib/python3/dist-packages/sqlalchemy/dialects/mysql/pymysql.py", line 62, in dbapi
    return __import__('pymysql')
ModuleNotFoundError: No module named 'pymysql'

Fixes #82
  • Loading branch information
liviuchircu committed Jul 22, 2021
1 parent 572d2db commit cc0ccd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packaging/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Homepage: https://github.com/OpenSIPS/opensips-cli
Package: opensips-cli
Architecture: all
Multi-Arch: foreign
Depends: python, ${misc:Depends}, ${python3:Depends}, python3-sqlalchemy, python3-sqlalchemy-utils, python3-openssl, python3-mysqldb
Depends: python, ${misc:Depends}, ${python3:Depends}, python3-sqlalchemy, python3-sqlalchemy-utils, python3-openssl, python3-mysqldb, python3-pymysql
Description: Interactive command-line tool for OpenSIPS 3.0+
This package contains the OpenSIPS CLI tool, an interactive command line tool
that can be used to control and monitor OpenSIPS 3.0+ servers.
Expand Down

0 comments on commit cc0ccd2

Please sign in to comment.