#6 TypeError("version: data type not supported")
Opened 7 years ago by karsten. Modified 7 years ago

Following the steps described in the README resulted in

Traceback (most recent call last):
File "/bin/dnf", line 58, in <module>
main.user_main(sys.argv[1:], exit_code=True)
File "/usr/lib/python3.5/site-packages/dnf/cli/main.py", line 174, in user_main
errcode = main(args)
File "/usr/lib/python3.5/site-packages/dnf/cli/main.py", line 60, in main
return _main(base, args)
File "/usr/lib/python3.5/site-packages/dnf/cli/main.py", line 112, in _main
cli.run()
File "/usr/lib/python3.5/site-packages/dnf/cli/cli.py", line 1099, in run
return self.command.run(self.base.extcmds)
File "/usr/lib/python3.5/site-packages/dnf-plugins/module.py", line 148, in run
cli.run(extcmds)
File "/usr/lib/python3.5/site-packages/fm/cli.py", line 110, in run
return self.list_modules(arg)
File "/usr/lib/python3.5/site-packages/fm/cli.py", line 253, in list_modules
mods = self.api.list_modules()
File "/usr/lib/python3.5/site-packages/fm/api_clients.py", line 117, in list_modules
mods.merge(client.list_modules())
File "/usr/lib/python3.5/site-packages/fm/api_client.py", line 233, in list_modules
return self.parse_json_list_response(json_data)
File "/usr/lib/python3.5/site-packages/fm/api_client.py", line 202, in parse_json_list_response
mmd.version = mod["version"]
File "/usr/lib/python3.5/site-packages/modulemd/init.py", line 390, in version
raise TypeError("version: data type not supported")
TypeError: version: data type not supported


Same here:

sudo dnf module enable xz

The json has:

[{'url': 'module-postgresql-1-3/latest/x86_64', 'requires': {}, 'version': '1', 'name': 'postgresql', 'summary': 'Postgresql module', 'release': '3'}, {'url': 'module-testmodule-4.3.44-2/latest/x86_64', 'requires': {}, 'version': '4.3.44', 'name': 'testmodule', 'summary': 'A test module containing the bash shell', 'release': '2'}, {'url': 'module-nginx-1-2/latest/x86_64', 'requires': {}, 'version': '1', 'name': 'nginx', 'summary': 'Nginx web-server module', 'release': '2'}, {'url': 'httpd-24/latest/x86_64', 'requires': {}, 'version': '24', 'name': 'fm-httpd', 'summary': 'The fm-httpd module', 'release': '1'}, {'url': 'httpd-dev/latest/x86_64', 'requires': {}, 'version': '25', 'name': 'fm-httpd', 'summary': 'The fm-httpd module', 'release': '1'}, {'url': 'module-testmodule-4.3.43-8/latest/x86_64', 'requires': {}, 'version': '4.3.43', 'name': 'testmodule', 'summary': 'A test module containing the bash shell', 'release': '8'}, {'url': 'module-testmodule-4.3.44-4/latest/x86_64', 'requires': {}, 'version': '4.3.44', 'name': 'testmodule', 'summary': 'A test module containing the bash shell', 'release': '4'}, {'url': 'module-testmodule-4.3.43-27/latest/x86_64', 'requires': {}, 'version': '4.3.43', 'name': 'testmodule', 'summary': 'A test module containing the bash shell', 'release': '27'}, {'url': 'module-testmodule-4.3.43-28/latest/x86_64', 'requires': {}, 'version': '4.3.43', 'name': 'testmodule', 'summary': 'A test module containing the bash shell', 'release': '28'}, {'url': 'module-testmodule-4.3.44-3/latest/x86_64', 'requires': {}, 'version': '4.3.44', 'name': 'testmodule', 'summary': 'A test module containing the bash shell', 'release': '3'}, {'url': 'module-postgresql-1-2/latest/x86_64', 'requires': {}, 'version': '1', 'name': 'postgresql', 'summary': 'Postgresql module', 'release': '2'}

Obviously the numbers in json are string. So it needs to be converted somewhere, probably in cli.py or api_client.py

Login to comment on this ticket.

Metadata