Skip to Content
Odoo Menu
  • Prijavi
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Knjigovodstvo
  • Zaloga
  • PoS
  • Projekt
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
Pomoč

selenium dont work

Naroči se

Get notified when there's activity on this post

This question has been flagged
developerscrap
1 Odgovori
3665 Prikazi
Avatar
Gaston Carrera

hello, i have the next problem, when run the webdriver in odoo, and load a webpage (WebB), then  i see this error



File "/odoo/odoo-server/addons/om_abatartrucks/models/crm.py", line 291, in calcula_distancia
    driver.get(webB)
  File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 333, in get
    self.execute(Command.GET, {'url': url})
  File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 319, in execute
    response = self.command_executor.execute(driver_command, params)
  File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/remote_connection.py", line 374, in execute
    return self._request(command_info[0], url, body=data)
  File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/remote_connection.py", line 402, in _request
    resp = http.request(method, url, body=body, headers=headers)
  File "/usr/lib/python3/dist-packages/urllib3/request.py", line 70, in request
    **urlopen_kw)
  File "/usr/lib/python3/dist-packages/urllib3/request.py", line 148, in request_encode_body
    return self.urlopen(method, url, **extra_kw)
  File "/usr/lib/python3/dist-packages/urllib3/poolmanager.py", line 322, in urlopen
    response = conn.urlopen(method, u.request_uri, **kw)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 639, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 367, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/lib/python3/dist-packages/six.py", line 692, in reraise
    raise value.with_traceback(tb)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 601, in urlopen
    chunked=chunked)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 387, in _make_request
    six.raise_from(e, None)
  File "", line 3, in raise_from
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 383, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/lib/python3.6/http/client.py", line 1377, in getresponse
    response.begin()
  File "/usr/lib/python3.6/http/client.py", line 320, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.6/http/client.py", line 289, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))



what can do?

Thanks

0
Avatar
Opusti
Hamza YAYA

Odoo is just a web app, you should provide more info if you want any assist, how do you run your selenium tests ? And you are using a non official addon "om_abatartrucks" in your environment. It is better to remove all unofficial before reporting an issue with odoo

Avatar
Gaston Carrera
Avtor Best Answer

made a answer for extend the info:

The case its that i have a code , wich when i run out of odoo works perfect:


from selenium import webdriver

from https://www.google.com.ar/maps/dir/"

​webB=webA+a+"/"+b+"/"

​driver = webdriver.Chrome(options=chrome_options)

​driver.get(webB)


​time.sleep(5)


​try:

​ ​accept_cookies = driver.find_element(by=By.XPATH, value="//button[@jsan='0.aria-checked,0.role']")

​ ​accept_cookies.click()

​ ​time.sleep(2)

​except:

​ ​pass

​print("a:", a)

​print("b:", b)

​print("WEB:", webB)

​pagina = str(soup(driver.page_source, 'html.parser'))



​driver.close()

​txtinicio_min="class=\"XdKEzd\">"

​txtfin_min=""

​txt_inicio2="\">"

​inicio=pagina.find(txtinicio_min)

​txtrecort_min=pagina[inicio+len(txtinicio_min):]

​ ​mintxt=txtrecort_min[txtrecort_min.find(txt_inicio2)+len(txt_inicio2):txtrecort_min.find(txtfin_min)]

​print("minutos:", Tomas(mintxt))

​try:

​ ​if mintxt.find("h")

​ ​ ​tiempo=round(2*(int(mintxt[:2])/60), 2)

​ ​ ​print(tiempo)

​ ​else:

​ ​ ​if mintxt.find("min")

​ ​ ​ ​tiempo=round(2*int(mintxt[:mintxt.find("h")]), 2)

​ ​ ​else:

​ ​ ​ ​tiempo=round(2*(int(mintxt[:mintxt.find("h")])+int(mintxt[mintxt.find("h")+2:mintxt.find("min")-1])/60), 2)

​except:

​ ​tiempo=0.2


​print(tiempo)


​return tiempo


ORIGEN="Belgrano, CABA"

DESTINO="Villa Urquiza, CABA"


print(LecturaDirec(ORIGEN,DESTINO))


But, when i put this in odoo start to fail, raise a lot of errors, my principal answer its about how run a web and print the "str(soup(driver.page_source, 'html.parser'))" line



0
Avatar
Opusti
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Prijavi
Related Posts Odgovori Prikazi Aktivnost
How to automatically scrap excess material after completing a manufacturing order in Odoo 18?
scrap
Avatar
Avatar
Avatar
2
jul. 25
1441
V16 Scrap product still available
scrap
Avatar
Avatar
1
jan. 24
1896
Odoo domain evaluation/interpretation
developer
Avatar
0
nov. 23
2632
Need help from a Odoo/OpenERP developer for small issues.
developer
Avatar
1
avg. 15
4285
Hire Purchase Accounting Development
accounting developer
Avatar
0
okt. 25
440
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now