Hi all,
Just wanted to share an issue and a quick workaround I found for it in case anyone else has the same problem. I believe a cmd2 update is causing pySim-shell to fail. After installing it on a fresh install of Ubuntu Server 20.04 and getting the following error when I run "python3 pySim-shell -p0":
Using PC/SC reader interface Autodetected card type: sysmoUSIM-SJS1 AIDs on card: USIM: a0000000871002ffffffff8907090000 Traceback (most recent call last): File "pySim-shell.py", line 512, in <module> app = PysimApp(card, rs, opts.script) File "pySim-shell.py", line 59, in __init__ super().__init__(persistent_history_file='~/.pysim_shell_history',
allow_cli_args=False, use_ipython=True, auto_load_commands=False, command_sets=basic_commands, >startup_script=script)
TypeError: __init__() got an unexpected keyword argument 'use_ipython'
If you run into this you can fix it by uninstalling cmd2 and reinstalling cmd2 with "pip3 install cmd2==1.5".
Best, Bryan
Hi Bryan,
On Fri, Jun 11, 2021 at 03:16:22PM -0400, bryan coxwell wrote:
Just wanted to share an issue and a quick workaround I found for it in case anyone else has the same problem. I believe a cmd2 update is causing pySim-shell to fail.
thanks for reporting this.
I can confirm the problem: cmd2 decided it is a good idea to rename the use_ipython argument to include_ipy in the following commit: https://github.com/python-cmd2/cmd2/commit/2397280cad072a27a51f5ec1cc6490803...
I've filed an issue to ask how applications are supposed to deal with that: https://github.com/python-cmd2/cmd2/issues/1120
Bryan, Did you install pysim dependencies with pip and requirements.txt, or with the upstream ubuntu packages? If you installed via pip, I believe the pythonic way to handle this is for dependencies to use semantic versioning, which it appears the cmd2 developers are following. Pip is rolling, and without a version constraint defaults to the latest release. cmd2 released a 2.0.0 version on June 6 ( https://github.com/python-cmd2/cmd2/releases/tag/2.0.0), but the pysim requirements.txt has no version constraint ( https://github.com/osmocom/pysim/blob/master/requirements.txt). Dependency management is known to be "not great" (in quotes as a sarcastic understatement : ) ) in python, and for applications with complex dependencies there are tools like pipenv and poetry (seems to be getting more traction now) that more rigorously isolate the environment and dependencies present, complete with lockfiles and reproducible environments. Since pysim is relatively simple, it is probably sufficient in practice to just add major version constraints to the requirements.txt, although a more rigorous from source install procedure could use poetry and a lockfile, at the cost of needing poetry on your system instead of just pip. If you installed dependencies via system package manager, I am surprised that ubuntu pulled a new version into their LTS repo, but I expect this is not the case, although I don't have an ubuntu machine handy to verify! Regards, -Matt J.
On Fri, Jun 11, 2021 at 2:30 PM Harald Welte laforge@osmocom.org wrote:
Hi Bryan,
On Fri, Jun 11, 2021 at 03:16:22PM -0400, bryan coxwell wrote:
Just wanted to share an issue and a quick workaround I found for it in
case
anyone else has the same problem. I believe a cmd2 update is causing pySim-shell to fail.
thanks for reporting this.
I can confirm the problem: cmd2 decided it is a good idea to rename the use_ipython argument to include_ipy in the following commit:
https://github.com/python-cmd2/cmd2/commit/2397280cad072a27a51f5ec1cc6490803...
I've filed an issue to ask how applications are supposed to deal with that: https://github.com/python-cmd2/cmd2/issues/1120
--
- Harald Welte laforge@osmocom.org
============================================================================ "Privacy in residential applications is a desirable marketing option." (ETSI EN 300 175-7 Ch. A6)
Hi Matt,
I already had https://gerrit.osmocom.org/c/pysim/+/24648 in gerrit since last night and now merged it. Let's hope the cmd2 situation is resolved now.
Many thanks for sharing! A cmd2 upgrade is triggering problems with pySim-shell on Ubuntu Web Server 20.04. Your job about might be valuable for others encountering comparable troubles. Have you thought about grabbing an assignment service in brighton for aid? They could give extra understandings or options to fix this concern effectively. Visit here at https://bestassignmentwriting.co.uk/assignment-writing-service-in-brighton
I truly valued the opportunity to talk about this issue here. I don't fully understand this problem, but it appears to be related to command parsing and prompt handling. A short-term solution could be to downgrade cmd2 or look for changes in the pySim repository. Check out our https://cipdassignmenthelp.uk.com/cipd-level-3 website, which allows you to concentrate on resolving CD issues without letting you get behind on assignments.