Skip to content
This repository has been archived by the owner on Apr 19, 2022. It is now read-only.

AttributeError: 'module' object has no attribute 'CMultiAV' #11

Open
MartinCharlis opened this issue Jan 27, 2016 · 4 comments
Open

AttributeError: 'module' object has no attribute 'CMultiAV' #11

MartinCharlis opened this issue Jan 27, 2016 · 4 comments

Comments

@MartinCharlis
Copy link

this code :
import pprint
import multiav

multi_av = multiav.CMultiAV()
ret = multi_av.scan(path, multiav.AV_SPEED_MEDIUM)
pprint.pprint(multi_av)

show this error:
Traceback (most recent call last): File "test.py", line 4, in <module> multi_av = multiav.CMultiAV() AttributeError: 'module' object has no attribute 'CMultiAV'

@joxeankoret
Copy link
Owner

Sorry for the late response! Due to recent changes instead of doing "import multiav" you should do the following

import pprint
from multiav.core import CMultiAV, AV_SPEED_MEDIUM

multi_av = CMultiAV()
ret = multi_av.scan(path, AV_SPEED_MEDIUM)
pprint.pprint(multi_av)

@joxeankoret
Copy link
Owner

The documentation needs to be updated, naturally. Thanks for pointing it out!

@DDB-en
Copy link

DDB-en commented Jan 1, 2017

mentioned code show this error:

import pprint
from multiav.core import CMultiAV, AV_SPEED_MEDIUM
multi_av = CMultiAV()
path='/tmp/virus-path'
ret = multi_av.scan(path, AV_SPEED_MEDIUM)

Error:

Process Process-19:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 601, in scan_one
av.scan(path)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 250, in scan
ep = parser.get(self.name, "UNIX_SOCKET")
File "/usr/lib/python2.7/ConfigParser.py", line 607, in get
raise NoSectionError(section)
NoSectionError: No section: 'ClamAV'
Process Process-20:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 601, in scan_one
av.scan(path)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 508, in scan
cmd.append("-REPORT=%s" % fname)
UnboundLocalError: local variable 'cmd' referenced before assignment
Process Process-21:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 601, in scan_one
av.scan(path)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 165, in scan
output = check_output(cmd)
UnboundLocalError: local variable 'cmd' referenced before assignment
Process Process-22:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 601, in scan_one
av.scan(path)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 370, in scan
output = check_output(cmd)
UnboundLocalError: local variable 'cmd' referenced before assignment
Process Process-23:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 601, in scan_one
av.scan(path)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 113, in scan
output = check_output(cmd)
UnboundLocalError: local variable 'cmd' referenced before assignment
Process Process-24:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 601, in scan_one
av.scan(path)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 209, in scan
output = check_output(cmd, stderr=devnull)
UnboundLocalError: local variable 'cmd' referenced before assignment
Process Process-25:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 601, in scan_one
av.scan(path)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 113, in scan
output = check_output(cmd)
UnboundLocalError: local variable 'cmd' referenced before assignment
Process Process-26:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 601, in scan_one
av.scan(path)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 445, in scan
cmd = self.build_cmd(path)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 96, in build_cmd
scan_path = parser.get(self.name, "PATH")
File "/usr/lib/python2.7/ConfigParser.py", line 607, in get
raise NoSectionError(section)
NoSectionError: No section: 'Ikarus'
Process Process-27:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 601, in scan_one
av.scan(path)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 390, in scan
ret = CAvScanner.scan(self, path)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 113, in scan
output = check_output(cmd)
UnboundLocalError: local variable 'cmd' referenced before assignment
Process Process-29:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 601, in scan_one
av.scan(path)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 415, in scan
cmd = self.build_cmd(path)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 96, in build_cmd
scan_path = parser.get(self.name, "PATH")
File "/usr/lib/python2.7/ConfigParser.py", line 607, in get
raise NoSectionError(section)
NoSectionError: No section: 'AVG'
Process Process-30:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 601, in scan_one
av.scan(path)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 342, in scan
return CAvScanner.scan(self, path)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 113, in scan
output = check_output(cmd)
UnboundLocalError: local variable 'cmd' referenced before assignment
Process Process-31:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 601, in scan_one
av.scan(path)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 330, in scan
return CAvScanner.scan(self, path)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 113, in scan
output = check_output(cmd)
UnboundLocalError: local variable 'cmd' referenced before assignment
Process Process-34:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 601, in scan_one
av.scan(path)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 304, in scan
cmd = self.build_cmd(path)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 96, in build_cmd
scan_path = parser.get(self.name, "PATH")
File "/usr/lib/python2.7/ConfigParser.py", line 607, in get
raise NoSectionError(section)
NoSectionError: No section: 'ESET'
Process Process-35:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 601, in scan_one
av.scan(path)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 113, in scan
output = check_output(cmd)
UnboundLocalError: local variable 'cmd' referenced before assignment
Process Process-36:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 601, in scan_one
av.scan(path)
File "/usr/local/lib/python2.7/dist-packages/multiav-0.1.0-py2.7.egg/multiav/core.py", line 113, in scan
output = check_output(cmd)
UnboundLocalError: local variable 'cmd' referenced before assignment

@joxeankoret
Copy link
Owner

Please don't post such a big back-trace and take a look to the first messages:

NoSectionError: No section: 'ClamAV'

It seems you don't have a correct config.cfg, that's it. Add the ClamAV section with the key "disabled=1". Do the same for each and all AVs you will not use.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants