Len-Stevens / Python-Antivirus

A simple antivirus coded in python capable of scanning selected files and deleting files that it detects as infected. This antivirus uses a large list of MD5, SHA1 and SHA256 malware hashes (many of which coming from this repo - https://github.com/Len-Stevens/MD5-Malware-Hashes) to determine infections. However as this project progresses I would like to implement machine learning detection with the long term goal of becoming a fully functioning antivirus. All Donations in Cryptocurrency are highly appreciated: Bitcoin: bc1qgnvw4x7w4m7uhafdne7seu4fvs73m44v9fu3ng Monero: 42xCsURykTQGqz6Kmy4rBm4ZVEpGv5NhcRFrqbgQZ3FzTXeFe9nzNjYCBzU7yMSGMqVzrHfNoMBfYfoALQcc69VtGNQeRWE Dogecoin: DD3rtFFBfusJSDmP8cmVp3X5Jq688B49gs Thank You! :)
GNU General Public License v3.0
88 stars 23 forks source link

Error with bitmap. #6

Open MandiYang opened 2 years ago

MandiYang commented 2 years ago

Using Ubuntu 22.04 Wayland Gnome with python3.10 and can't browse files to scan.

I am trying so solve it with https://stackoverflow.com/questions/20860325/python-3-tkinter-iconbitmap-error-in-ubuntu and https://stackoverflow.com/questions/70742619/tkinter-tclerror-bitmap-icon-ico-not-defined right now. I think that the problem is that only windows can read .ico files.

Traceback (most recent call last):
  File "/home/mandi/TEMP/Python-Antivirus/Antivirus.py", line 767, in <lambda>
    self.SelectFileButton.clicked.connect(lambda: browseFiles(MainWindow, self))
  File "/home/mandi/TEMP/Python-Antivirus/Antivirus.py", line 365, in browseFiles
    root.iconbitmap(current_dir + '\\res\\ico\\AntiVirus_ico.ico')
  File "/usr/lib/python3.10/tkinter/__init__.py", line 2109, in wm_iconbitmap
    return self.tk.call('wm', 'iconbitmap', self._w, bitmap)
_tkinter.TclError: bitmap "/home/mandi/TEMP/Python-Antivirus\res\ico\AntiVirus_ico.ico" not defined
cookie0o commented 2 years ago

try to use this repo; https://github.com/cookie0o/Python-Antivirus-v2 It´s a newer and the problem might not occur in it otherwise it could be an error with Python v3. 10 since its only tested in 3.8. If you still get this error I´ll try to fix it in v2.5.

EDIT Did´nt see that with windows can only read .ico files, I´ll prob just check what os is used and if Linux is used it will not use a .ico file.

cookie0o commented 2 years ago

Error fixed. Hope its working for you!

MandiYang commented 2 years ago

@cookie0o review this change :), #12