eliasgranderubio / dagda

a tool to perform static analysis of known vulnerabilities, trojans, viruses, malware & other malicious threats in docker images/containers and to monitor the docker daemon and running docker containers for detecting anomalous activities
Apache License 2.0
1.16k stars 163 forks source link

JSONDecodeError doesn't exist before Python 3.5 #20

Closed keepwatch closed 7 years ago

keepwatch commented 7 years ago

When doing a first-time setup (e.g. with REST API endpoint vuln/init), I get the following error:

AttributeError: 'module' object has no attribute 'JSONDecodeError'

It looks like you are expecting json.JSONDecodeError here to fire when the bugtraq data cannot be properly decoded. However, this error class was first added in Python 3.5 (compare 3.4 and 3.5), and the system requirements only state Python3.3+ is required.

Although you could simply bump the version requirement in the readme, would you consider making this compatable with < 3.5 Python? For example, Ubuntu 14.05's builtin Python3 is only 3.4.3.

eliasgranderubio commented 7 years ago

I agree with you. I should not have used json.JSONDecodeError for avoiding compatibility issues. Could you check this issue again for checking if it is fixed?

Thanks in advance.

keepwatch commented 7 years ago

I'm not getting the AttributeError any longer - after dropping and reinitializing the database, everything was imported without error. Thank you!