ConfigParser.NoSectionError: No section: 'main' - python-2.7

I installed habo malware hunter, but when i ran it,i got following errors:
habo#habo-VirtualBox:~/HaboMalHunter$ sudo python AnalyzeControl.py -z -l ./test_0813.zip Traceback (most recent call last):
File "AnalyzeControl.py", line 688, in <module>
ret = main(len(sys.argv), sys.argv)
File "AnalyzeControl.py", line 615, in main
cfg = init_arguments(argv)
File "AnalyzeControl.py", line 156, in init_arguments
cfg = init_cfg(args.config_path,args)
File "AnalyzeControl.py", line 96, in init_cfg
for k,v in conf_parser.items(SECTION_DEF):
File "/usr/lib/python2.7/ConfigParser.py", line 642, in items
raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'main'

Related

Can't compile cython program using pyximport in Mac M1

I'm trying to use Cython (Cython version 0.29.30) to speed up my computations in Mac M1, and testing the .pyx by pyximport, but I got:
/Users/xxxx/.pyxbld/temp.macosx-10.9-universal2-3.10/pyrex/binomial.c:697:10: fatal error: 'ios' file not found
#include "ios"
^~~~~
1 error generated.
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/unixccompiler.py", line 117, in _compile
self.spawn(compiler_so + cc_args + [src, '-o', obj] +
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/ccompiler.py", line 910, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/spawn.py", line 91, in spawn
raise DistutilsExecError(
distutils.errors.DistutilsExecError: command '/usr/bin/clang' failed with exit code 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyximport/pyximport.py", line 214, in load_module
so_path = build_module(module_name, pyxfilename, pyxbuild_dir,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyximport/pyximport.py", line 186, in build_module
so_path = pyxbuild.pyx_to_dll(pyxfilename, extension_mod,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyximport/pyxbuild.py", line 102, in pyx_to_dll
dist.run_commands()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
_build_ext.build_ext.build_extensions(self)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/command/build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/command/build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/command/build_ext.py", line 529, in build_extension
objects = self.compiler.compile(sources,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/unixccompiler.py", line 120, in _compile
raise CompileError(msg)
distutils.errors.CompileError: command '/usr/bin/clang' failed with exit code 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyximport/pyximport.py", line 459, in load_module
module = load_module(fullname, self.path,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyximport/pyximport.py", line 231, in load_module
raise exc.with_traceback(tb)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyximport/pyximport.py", line 214, in load_module
so_path = build_module(module_name, pyxfilename, pyxbuild_dir,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyximport/pyximport.py", line 186, in build_module
so_path = pyxbuild.pyx_to_dll(pyxfilename, extension_mod,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyximport/pyxbuild.py", line 102, in pyx_to_dll
dist.run_commands()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
_build_ext.build_ext.build_extensions(self)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/command/build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/command/build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/command/build_ext.py", line 529, in build_extension
objects = self.compiler.compile(sources,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/unixccompiler.py", line 120, in _compile
raise CompileError(msg)
ImportError: Building module binomial failed: ["distutils.errors.CompileError: command '/usr/bin/clang' failed with exit code 1\n"]
I'm quite new in Cython. When I ran cython xxx.pyx directly, it worked. The answers in this question are great help, but I was confused and sought for a better solution. I tried the first answer that tried to use C++ compiler:
>>> script_args = ["--cython-cplus"]
>>> setup_args = {"script_args": script_args}
>>> pyximport.install(setup_args=setup_args, language_level=3)
but got:
distutils.errors.DistutilsExecError: command '/usr/bin/clang++' failed with exit code 1
So I tried the second answer. It works fine. This means that I have to create a .pyxbld file for each .pyx file, which is quite annoying.
How can I solve this?

happybase hbase table.put command error?

I am trying to connect to hbase-1.2.6 from python code, is as:
import happybase
connection = happybase.Connection(host='localhost',port=16010)
table = connection.table('blogpost')
table.put('1', {'post:title': 'hello world1'})
I manually created the table-"blogpost" in hbase. I am using python-2.7 and happybase-1.1.0.
error log are as:
/usr/bin/python2.7 /home/spark/PycharmProjects/PySpark/hbase.py
Traceback (most recent call last):
File "/home/spark/PycharmProjects/PySpark/hbase.py", line 5, in <module>
table.put('1', {'post:title': 'hello world1'})
File "/usr/local/lib/python2.7/dist-packages/happybase/table.py", line 464, in put
batch.put(row, data)
File "/usr/local/lib/python2.7/dist-packages/happybase/batch.py", line 137, in __exit__
self.send()
File "/usr/local/lib/python2.7/dist-packages/happybase/batch.py", line 60, in send
self._table.connection.client.mutateRows(self._table.name, bms, {})
File "/usr/local/lib/python2.7/dist-packages/thriftpy/thrift.py", line 198, in _req
return self._recv(_api)
File "/usr/local/lib/python2.7/dist-packages/thriftpy/thrift.py", line 210, in _recv
fname, mtype, rseqid = self._iprot.read_message_begin()
File "thriftpy/protocol/cybin/cybin.pyx", line 439, in cybin.TCyBinaryProtocol.read_message_begin (thriftpy/protocol/cybin/cybin.c:6470)
cybin.ProtocolError: No protocol version header
thanks.
Process finished with exit code 1

error while auto downloading a report through selenium and python

I'm doing automation of a website and auto downloading a report through selenium and python and I get this error:
C:\Windows\system32>
C:\Python27\python.exeC:\Python27\Scripts\MH_Download3.py
Traceback (most recent call last):
File "C:\Python27\Scripts\MH_Download3.py", line 111, in <module>
driver = webdriver.Firefox(firefox_binary=binary)
File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 80, in __init__self.binary, timeout)
File`"C:\Python27\lib\sitepackages\selenium\webdriver\firefox\extension_connection.py", line 52, in __init__self.binary.launch_browser(self.profile, timeout=timeout)
File "C:\Python27\lib\sitepackages\selenium\webdriver\firefox\firefox_binary.py", line 67, in launch_browserself._start_from_profile_path(self.profile.path)
File "C:\Python27\lib\sitepackages\selenium\webdriver\firefox\firefox_binary.py", line 90, in _start_from_profile_path env=self._firefox_env)
File "C:\Python27\lib\subprocess.py", line 709, in __init__ errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 957, in _execute_child startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

Cannot start RIDE.py in ubuntu after the installation

Could you please help to solve this problem.
I have installed Python2.7, Selenium2Library, WXPython; Robot Framework...
when I want to start the Ride I got the following error.
:~$ ride.py
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/robotide/__init__.py", line 74, in main
_run(inpath, not noupdatecheck, debug_console)
File "/usr/local/lib/python2.7/dist-packages/robotide/__init__.py", line 100, in _run
ride = RIDE(inpath, updatecheck)
File "/usr/local/lib/python2.7/dist-packages/robotide/application/application.py", line 42, in __init__
wx.App.__init__(self, redirect=False)
File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py", line 8628, in __init__
self._BootstrapApp()
File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py", line 8196, in _BootstrapApp
return _core_.PyApp__BootstrapApp(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/robotide/application/application.py", line 47, in OnInit
self.settings = RideSettings()
File "/usr/local/lib/python2.7/dist-packages/robotide/preferences/settings.py", line 316, in __init__
user_path = initialize_settings(default_path)
File "/usr/local/lib/python2.7/dist-packages/robotide/preferences/settings.py", line 29, in initialize_settings
SETTINGS_DIRECTORY, path, dest_file_name)
File "/usr/local/lib/python2.7/dist-packages/robotide/preferences/settings.py", line 46, in _copy_or_migrate_user_settings
SettingsMigrator(source_path, settings_path).migrate()
File "/usr/local/lib/python2.7/dist-packages/robotide/preferences/settings.py", line 94, in migrate
self.merge()
File "/usr/local/lib/python2.7/dist-packages/robotide/preferences/settings.py", line 98, in merge
self._write_merged_settings(self._default_settings, self._user_path)
File "/usr/local/lib/python2.7/dist-packages/robotide/preferences/settings.py", line 186, in _write_merged_settings
'Could not open settings file "%s" for writing' % path)
RuntimeError: Could not open settings file "/home/said/.robotframework/ride/settings.cfg" for writing
The error message is clear:
RuntimeError: Could not open settings file "/home/said/.robotframework/ride/settings.cfg" for writing
Possible solutions:
cd ; pwd ;
/home/said
rm -rf .robotframework
or
sudo chown -R said:said .robotframework

scipy.test() results in errors

Having some problems with scipy. Installed latest version using pip (0.17.0). Run scipy.test() and I'm getting the following errors. Are they okay to ignore? I'm using python 2.7.6.
Thanks for your help.
======================================================================
ERROR: test_add_function_ordered (test_catalog.TestCatalog)
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/tests/test_catalog.py", line 477, in test_add_function_ordered
q.add_function('f',string.upper)
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/catalog.py", line 833, in add_function
self.add_function_persistent(code,function)
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/catalog.py", line 849, in add_function_persistent
cat = get_catalog(cat_dir,mode)
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/catalog.py", line 486, in get_catalog
sh = shelve.open(catalog_file,mode)
File "/usr/lib/python2.7/shelve.py", line 239, in open
return DbfilenameShelf(filename, flag, protocol, writeback)
File "/usr/lib/python2.7/shelve.py", line 222, in init
import anydbm
File "/usr/lib/python2.7/anydbm.py", line 50, in
_errors.append(_mod.error)
AttributeError: 'module' object has no attribute 'error'
======================================================================
ERROR: test_add_function_persistent1 (test_catalog.TestCatalog)
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/tests/test_catalog.py", line 466, in test_add_function_persistent1
q.add_function_persistent('code',i)
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/catalog.py", line 849, in add_function_persistent
cat = get_catalog(cat_dir,mode)
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/catalog.py", line 486, in get_catalog
sh = shelve.open(catalog_file,mode)
File "/usr/lib/python2.7/shelve.py", line 239, in open
return DbfilenameShelf(filename, flag, protocol, writeback)
File "/usr/lib/python2.7/shelve.py", line 222, in init
import anydbm
File "/usr/lib/python2.7/anydbm.py", line 50, in
_errors.append(_mod.error)
AttributeError: 'module' object has no attribute 'error'
======================================================================
ERROR: test_get_existing_files2 (test_catalog.TestCatalog)
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/tests/test_catalog.py", line 394, in test_get_existing_files2
q.add_function('code', os.getpid)
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/catalog.py", line 833, in add_function
self.add_function_persistent(code,function)
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/catalog.py", line 849, in add_function_persistent
cat = get_catalog(cat_dir,mode)
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/catalog.py", line 486, in get_catalog
sh = shelve.open(catalog_file,mode)
File "/usr/lib/python2.7/shelve.py", line 239, in open
return DbfilenameShelf(filename, flag, protocol, writeback)
File "/usr/lib/python2.7/shelve.py", line 222, in init
import anydbm
File "/usr/lib/python2.7/anydbm.py", line 50, in
_errors.append(_mod.error)
AttributeError: 'module' object has no attribute 'error'
======================================================================
ERROR: test_create_catalog (test_catalog.TestGetCatalog)
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/tests/test_catalog.py", line 286, in test_create_catalog
cat = catalog.get_catalog(pardir,'c')
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/catalog.py", line 486, in get_catalog
sh = shelve.open(catalog_file,mode)
File "/usr/lib/python2.7/shelve.py", line 239, in open
return DbfilenameShelf(filename, flag, protocol, writeback)
File "/usr/lib/python2.7/shelve.py", line 222, in init
import anydbm
File "/usr/lib/python2.7/anydbm.py", line 50, in
_errors.append(_mod.error)
AttributeError: 'module' object has no attribute 'error'
Ran 20343 tests in 138.416s
FAILED (KNOWNFAIL=98, SKIP=1679, errors=4)
All these are in weave, which is not used anywhere else in scipy itself. So unless you're using weave directly, you're likely OK. And there is likely no reason to use weave in new code anyway.