AttributeError: 'GoogleImageScraper' object has no attribute 'driver' - python

So, i'm trying to make a face comparision with python and a google image scaper but I don't know why I'm getting this error:
Traceback (most recent call last):
File "c:\Users\..\Desktop\face_recognition\main.py", line 79, in find_image_urls
self.driver.get(self.url)
AttributeError: 'GoogleImageScraper' object has no attribute 'driver'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\Users\..\Desktop\face_recognition\main.py", line 189, in <module>
image_urls = image_scrapper.find_image_urls()
File "c:\Users\..\Desktop\face_recognition\main.py", line 81, in find_image_urls
self.driver.get(url=self.url)
AttributeError: 'GoogleImageScraper' object has no attribute 'driver'
My main.py file
Please help me this is very important.

Related

Unable to create owl:NamedIndividual on owlready2

I need to create a NamedIndividual (https://www.w3.org/TR/owl2-syntax/#Named_Individuals) but I am not seeing a way to do it.
The following example:
from owlready2 import *
onto = get_ontology("example")
class NamedIndividual(Thing): namespace = owl
print(NamedIndividual.iri)
print(NamedIndividual.name)
mini = NamedIndividual()
onto.save("minrep.rdf")
Gives the following error:
http://www.w3.org/2002/07/owl#NamedIndividual
NamedIndividual
Traceback (most recent call last):
File "minrep.py", line 13, in <module>
mini = NamedIndividual("example")
File "/home/lubianat/Documents/main_venv/lib/python3.8/site-packages/owlready2/individual.py", line 137, in __init__
if self.storid > 0: self.namespace.ontology._add_obj_triple_spo(self.storid, rdf_type, owl_named_individual)
TypeError: '>' not supported between instances of 'str' and 'int'
If I instantiate the class without a name, I get another error:
http://www.w3.org/2002/07/owl#NamedIndividual
NamedIndividual
Traceback (most recent call last):
File "minrep.py", line 13, in <module>
mini = NamedIndividual()
File "/home/lubianat/Documents/main_venv/lib/python3.8/site-packages/owlready2/individual.py", line 123, in __init__
iri = self.namespace.world._new_numbered_iri("%s%s" % (self.namespace._base_iri, self.generate_default_name()))
AttributeError: 'World' object has no attribute '_new_numbered_iri'
Any ideas on what is happening there? Thanks!

Why there is STAFRegister error in PySTAF.py?

I am getting the below error. I have used capital letters PYSTAF too, still getting the same error.
Traceback (most recent call last):
File "C:\Python27\STAFtest.py", line 16, in <module>
handle = STAFHandle("Lang/Python/Test/Basic")
File "D:\STAF\bin\PySTAF.py", line 137, in __init__
rc, self.handle = PySTAF.STAFRegister(handleNameOrNumber)
AttributeError: 'module' object has no attribute 'STAFRegister'

SystemError exception occurs when running click.confirm

I am trying to run a click.confirm() command. It works when I run the file stand-alone, but when I call the function from another module I get a SystemError
Traceback (most recent call last):
File "/home/usr/.local/lib/python3.6/site-packages/click/_compat.py", line 108, in __getattr__
return getattr(self._stream, name)
File "/home/usr/.vscode-server/extensions/ms-python.python-2022.6.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_io.py", line 59, in __getattr__
raise AttributeError(name)
AttributeError: closed
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/usr/.local/lib/python3.6/site-packages/click/termui.py", line 231, in confirm
echo(prompt.rstrip(" "), nl=False, err=err)
File "/home/usr/.local/lib/python3.6/site-packages/click/utils.py", line 298, in echo
file.write(out) # type: ignore
SystemError: <built-in method write of _NonClosingTextIOWrapper object at 0x7f20e85ea048> returned a result with an error set
I run my program on a computer over SSH using the vscode extension

why this error occurs 'reset modules states' in odoo 10

I am getting this error in odoo10 enterprise?
any suggestions to solve this?
Traceback (most recent call last):
File "/home/odoodev/odoo10Enter/la10e/addons/base/ir/ir_cron.py", line 285, in _acquire_job
cls._process_jobs(db_name)
File "/home/odoodev/odoo10Enter/la10e/addons/base/ir/ir_cron.py", line 222, in _process_jobs
odoo.modules.reset_modules_state(db_name)
AttributeError: 'module' object has no attribute 'reset_modules_state'
2019-09-23 04:52:19,215 3048 WARNING ? odoo.addons.base.ir.ir_cron: Exception in cron:
Traceback (most recent call last):
File "/home/odoodev/odoo10Enter/la10e/addons/base/ir/ir_cron.py", line 285, in _acquire_job
cls._process_jobs(db_name)
File "/home/odoodev/odoo10Enter/la10e/addons/base/ir/ir_cron.py", line 222, in _process_jobs
odoo.modules.reset_modules_state(db_name)
AttributeError: 'module' object has no attribute 'reset_modules_states'

Error pjsua on windows

I want to start programming my SIP client and I started with an example of pjsua to test REGISTRATION CODE
Traceback (most recent call last):
File "D:\work\zscenter\registration.py", line 49, in <module>
lib.create_transport(pj.TransportType.UDP, pj.TransportConfig(5080))
File "C:\Python27\lib\site-packages\pjsua.py", line 2301, in create_transport
err, tp_id = _pjsua.transport_create(type, cfg._cvt_to_pjsua())
File "C:\Python27\lib\site-packages\pjsua.py", line 536, in _cvt_to_pjsua
cfg.qos_type = self.qos_type
AttributeError: '_pjsua.Transport_Config' object has no attribute 'qos_type'
Exception AttributeError: "'NoneType' object has no attribute 'destroy'"
in <bound method Lib.__del__ of <pjsua.Lib instance at 0x0212AE40>> ignored
can someone help me please ?
I installed the latest version and its working fine thanks

Categories

Resources