Zum Inhalt springen
Odoo Menü
  • Anmelden
  • Jetzt gratis testen
  • Apps
    Finanzen
    • Buchhaltung
    • Rechnungsstellung
    • Spesenabrechnung
    • Tabellenkalkulation (BI)
    • Dokumente
    • E-Signatur
    Vertrieb
    • CRM
    • Vertrieb
    • Kassensystem – Shop
    • Kassensystem – Restaurant
    • Abonnements
    • Vermietung
    Websites
    • Website-Builder
    • E-Commerce
    • Blog
    • Forum
    • Livechat
    • E-Learning
    Lieferkette
    • Lager
    • Fertigung
    • PLM
    • Einkauf
    • Wartung
    • Qualität
    Personalwesen
    • Mitarbeiter
    • Personalbeschaffung
    • Abwesenheiten
    • Mitarbeiterbeurteilung
    • Personalempfehlungen
    • Fuhrpark
    Marketing-
    • Social Marketing
    • E-Mail-Marketing
    • SMS-Marketing
    • Veranstaltungen
    • Marketing-Automatisierung
    • Umfragen
    Dienstleistungen
    • Projekte
    • Zeiterfassung
    • Außendienst
    • Kundendienst
    • Planung
    • Termine
    Produktivität
    • Dialog
    • Genehmigungen
    • IoT
    • VoIP
    • Wissensdatenbank
    • WhatsApp
    Apps von Drittanbietern Odoo Studio Odoo Cloud-Plattform
  • Branchen
    Einzelhandel
    • Buchladen
    • Kleidergeschäft
    • Möbelhaus
    • Lebensmittelgeschäft
    • Baumarkt
    • Spielwarengeschäft
    Essen & Gastgewerbe
    • Bar und Kneipe
    • Restaurant
    • Fast Food
    • Gästehaus
    • Getränkehändler
    • Hotel
    Immobilien
    • Immobilienagentur
    • Architekturbüro
    • Baugewerbe
    • Immobilienverwaltung
    • Gartenarbeit
    • Eigentümervereinigung
    Beratung
    • Buchhaltungsfirma
    • Odoo-Partner
    • Marketingagentur
    • Anwaltskanzlei
    • Talentakquise
    • Prüfung & Zertifizierung
    Fertigung
    • Textil
    • Metall
    • Möbel
    • Speisen
    • Brauerei
    • Firmengeschenke
    Gesundheit & Fitness
    • Sportklub
    • Brillengeschäft
    • Fitnessstudio
    • Therapeut
    • Apotheke
    • Friseursalon
    Handel
    • Handyman
    • IT-Hardware & -Support
    • Solarenergiesysteme
    • Schuster
    • Reinigungsdienstleistungen
    • HLK-Dienstleistungen
    Sonstiges
    • Gemeinnützige Organisation
    • Umweltschutzagentur
    • Plakatwandvermietung
    • Fotostudio
    • Fahrrad-Leasing
    • Software-Händler
    Alle Branchen ansehen
  • Community
    Lernen
    • Tutorials
    • Dokumentation
    • Zertifizierungen
    • Schulung
    • Blog
    • Podcast
    Bildung fördern
    • Bildungsprogramm
    • Scale-Up! Planspiel
    • Odoo besuchen
    Software anfragen
    • Herunterladen
    • Editionen vergleichen
    • Releases
    Zusammenarbeiten
    • Github
    • Forum
    • Veranstaltungen
    • Übersetzungen
    • Partner werden
    • Dienstleistungen für Partner
    • Buchhaltungsfirma registrieren
    Services anfragen
    • Partner finden
    • Buchhalter finden
    • Einen Experten treffen
    • Implementierungsservices
    • Kundenreferenzen
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Eine Demo erhalten
  • Preiskalkulation
  • Hilfe

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

  • CRM
  • e-Commerce
  • Buchhaltung
  • Lager
  • PoS
  • Projekte
  • MRP
All apps
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo accounting v14 pos v15
Über dieses Forum
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo accounting v14 pos v15
Über dieses Forum
Hilfe

Can't run Selenium code inside Odoo

Abonnieren

Erhalten Sie eine Benachrichtigung, wenn es eine Aktivität zu diesem Beitrag gibt

Diese Frage wurde gekennzeichnet
Seleniumv15
4 Antworten
5671 Ansichten
Avatar
Fred Nunes

Hi everyone, I'm trying to trigger a very simple web scraper from Odoo. Right now, all I am trying to do is to instantiate a webdriver.Chrome object inside one of my model's functions, that is triggered by a button on my form view.

I am able to run this code as a separate python script (simply doing python my_script.py) which proves that Selenium is correctly configured in my system. However, it seems like the Odoo server's threads have a problem running it:

selenium\.common\.exceptions\.WebDriverException:\ Message:\ Service\ /root/\.wdm/drivers/chromedriver/linux64/103.0.5060.53/chromedriver unexpectedly exited. Status code was: -5

I have spent several hours trying to understand what is going on, but to no avail. Things I've tried so far include using both Chrome, Chromium and Firefox; tried every single combination of Webdriver parameters (headless, etc.); trying giving full permissions on chromedriver, chrome and chromium executables (chmod 777); running odoo with and without sudo.

Unfortauntely nothing worked so far, so I started looking into Odoo's ThreadedServer code, so see if I found any reason why Selenium's subprocess.Popen calls wouldn't work, but unfortunately this is so beyond my knowledge that I don't even know what to Google!

Any insights would be greatly appreciated... thanks!

2
Avatar
Verwerfen
Avatar
Enric Tobella Alomar
Beste Antwort

The problem is related to limit_memory_hard. Increase it and it will work properly. I had the same issue. 

1
Avatar
Verwerfen
Vaidehi Vasani

I set it like limit_memory_hard=2684354560
but still the same

Enric Tobella Alomar

You need to increase it even more.

Vaidehi Vasani

Oh yeah I agree, with
limit_memory_hard=99999999999
It works all okay, this was so strange, I wonder how you could find such resolution, thanks a lot

Enric Tobella Alomar

All thanks to your question! You inspired me the idea, and after a lot of test I was able to figure it out. Selenium is opening a browser, but Odoo limits the memory of the thread. It closes abruptly due to that limit. For that reason, it is necessary to increase it so much.

Avatar
Julian
Beste Antwort

Hi, i try to apply the answer of Enric Tobella Alomar , but doesnt works for me, stay raising the error  "Status code was: -5". Im doing good?  

i go to the "odoo.conf" and add the next line:
limit_memory_hard=999999999999

its right like this?

1
Avatar
Verwerfen
Avatar
QSB Consulting
Beste Antwort

Please add the following line before creating the driver object.

https://github.com/Vauxoo/odoo-selenium/blob/main/src/odoo_selenium/selenium.py#L88

0
Avatar
Verwerfen
Avatar
GEMASTIC E.I.R.L.
Beste Antwort

I have the same error, I am working in Odoo 14 CE, Ubuntu 20, 8 GB Memory and 4 vCPUs, Any suggestions?

0
Avatar
Verwerfen
Fred Nunes
Autor

I wasn't able to fix it, so what I did was I delegated the Selenium code to a small HTTP server running side on the same machine as my Odoo instance, and I just send requests from Odoo to the server.

Olli

Did you find any other solution? Also facing this issue

Adnier Roselló

Hi Fred Nunes, How can I delegate the execution of selenium to a http server to send requests out of odoo? if you can share your solution it would be very helpful, thank you very much in advance

Denis Nichiporchik

Hi Fred Nunes and Adnier Roselló.
Could you share your solution if you found it? Thank you.

Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!

Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!

Registrieren
Verknüpfte Beiträge Antworten Ansichten Aktivität
Prevent navigation if records are not save
v15
Avatar
Avatar
Avatar
2
Okt. 25
3462
Creating user creates duplicated partner_id
v15
Avatar
Avatar
1
Sept. 25
3349
Sales order line comment to Purchase order line comment Gelöst
v15
Avatar
Avatar
3
Juli 25
4552
attribute is not applied when dynamically rendering
v15
Avatar
1
Mai 25
2687
Odoo Custome Module Language Creation
v15
Avatar
Avatar
Avatar
Avatar
4
Mai 25
4113
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Herunterladen
  • Github
  • Runbot
  • Übersetzungen
Dienstleistungen
  • Odoo.sh-Hosting
  • Support
  • Upgrade
  • Individuelle Entwicklungen
  • Bildung
  • Buchhalter finden
  • Partner finden
  • Partner werden
Über uns
  • Unsere Firma
  • Markenwerte
  • Kontakt
  • Karriere
  • Veranstaltungen
  • Podcast
  • Blog
  • Kunden
  • Rechtliches • Datenschutz
  • Sicherheit
الْعَرَبيّة 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 ist eine Suite von Open-Source-Betriebsanwendungen, die alle Bedürfnisse Ihres Unternehmens abdecken: CRM, E-Commerce, Buchhaltung, Lager, Kassensystem, Projektmanagement etc.

Das einzigartige Wertversprechen von Odoo ist, dass es gleichzeitig sehr einfach zu bedienen und voll integriert ist.

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