久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    • <bdo id='yGuvV'></bdo><ul id='yGuvV'></ul>

    <small id='yGuvV'></small><noframes id='yGuvV'>

      <tfoot id='yGuvV'></tfoot>
    1. <i id='yGuvV'><tr id='yGuvV'><dt id='yGuvV'><q id='yGuvV'><span id='yGuvV'><b id='yGuvV'><form id='yGuvV'><ins id='yGuvV'></ins><ul id='yGuvV'></ul><sub id='yGuvV'></sub></form><legend id='yGuvV'></legend><bdo id='yGuvV'><pre id='yGuvV'><center id='yGuvV'></center></pre></bdo></b><th id='yGuvV'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='yGuvV'><tfoot id='yGuvV'></tfoot><dl id='yGuvV'><fieldset id='yGuvV'></fieldset></dl></div>
    2. <legend id='yGuvV'><style id='yGuvV'><dir id='yGuvV'><q id='yGuvV'></q></dir></style></legend>

    3. InvalidArgumentException:消息:無效參數:用戶數據目錄

      InvalidArgumentException: Message: invalid argument: user data directory is already in use error using --user-data-dir to start Chrome using Selenium(InvalidArgumentException:消息:無效參數:用戶數據目錄已在使用錯誤使用 --u
      • <tfoot id='dYLEB'></tfoot>
          <legend id='dYLEB'><style id='dYLEB'><dir id='dYLEB'><q id='dYLEB'></q></dir></style></legend>
          <i id='dYLEB'><tr id='dYLEB'><dt id='dYLEB'><q id='dYLEB'><span id='dYLEB'><b id='dYLEB'><form id='dYLEB'><ins id='dYLEB'></ins><ul id='dYLEB'></ul><sub id='dYLEB'></sub></form><legend id='dYLEB'></legend><bdo id='dYLEB'><pre id='dYLEB'><center id='dYLEB'></center></pre></bdo></b><th id='dYLEB'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='dYLEB'><tfoot id='dYLEB'></tfoot><dl id='dYLEB'><fieldset id='dYLEB'></fieldset></dl></div>

          <small id='dYLEB'></small><noframes id='dYLEB'>

            <tbody id='dYLEB'></tbody>
              <bdo id='dYLEB'></bdo><ul id='dYLEB'></ul>

              1. 本文介紹了InvalidArgumentException:消息:無效參數:用戶數據目錄已在使用錯誤使用 --user-data-dir 使用 Selenium 啟動 Chrome的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                當我嘗試使用 --user-data-dir 讓當前用戶使用 Selenium 啟動 Chrome 時,我收到以下錯誤:

                When I am trying to use --user-data-dir for the current user to start Chrome using Selenium I am getting an error as:

                  File "C:Program Files (x86)Pythonlibsite-packagesseleniumwebdriver
                emotewebdriver.py", line 321, in execute
                    self.error_handler.check_response(response)
                  File "C:Program Files (x86)Pythonlibsite-packagesseleniumwebdriver
                emoteerrorhandler.py", line 242, in check_response
                    raise exception_class(message, screen, stacktrace)
                selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: user data directory is already in use, please specify a unique value for --user-data-dir argument, or don't use --user-data-dir
                

                我該如何解決這個錯誤?

                How can I fix this error?

                推薦答案

                這個錯誤信息...

                selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: user data directory is already in use, please specify a unique value for --user-data-dir argument, or don't use --user-data-dir
                

                ...暗示 ChromeDriver 無法使用指定的 用戶數據目錄 啟動新的 Chrome 瀏覽器 會話,因為它已經正在使用中.

                ...implies that the ChromeDriver was unable to initiate the new Chrome Browser session using the specified user data directory as it was already in use.

                這個錯誤可以重現如下:

                This error can be reproduced as follows:

                • 代碼塊:

                • Code Block:

                from selenium import webdriver
                import getpass
                
                options = webdriver.ChromeOptions() 
                options.add_argument("start-maximized")
                options.add_argument(r"--user-data-dir=C:Users{}AppDataLocalGoogleChromeUser Data".format(getpass.getuser()))
                driver = webdriver.Chrome(options=options, executable_path=r'C:WebDriverschromedriver.exe')
                driver.get("https://www.google.com/")
                

              2. 完成相關回溯:

              3. Complete relevant traceback:

                [12148:21412:0204/035557.731:ERROR:cache_util_win.cc(21)] Unable to move the cache: Access is denied. (0x5)
                [12148:21412:0204/035557.731:ERROR:cache_util.cc(141)] Unable to move cache folder C:UsersSoma BhattacharjeeAppDataLocalGoogleChromeUser DataShaderCacheGPUCache to C:UsersSoma BhattacharjeeAppDataLocalGoogleChromeUser DataShaderCacheold_GPUCache_000
                [12148:21412:0204/035557.731:ERROR:disk_cache.cc(178)] Unable to create cache
                [12148:21412:0204/035557.731:ERROR:shader_disk_cache.cc(605)] Shader Cache Creation failed: -2
                Opening in existing browser session.
                Traceback (most recent call last):
                  File "C:UsersSoma BhattacharjeeDesktopDebanjanPyProgramsyandex_ru.py", line 18, in <module>
                    driver = webdriver.Chrome(options=options, executable_path=r'C:WebDriverschromedriver.exe')
                  File "C:Pythonlibsite-packagesseleniumwebdriverchromewebdriver.py", line 81, in __init__
                    desired_capabilities=desired_capabilities)
                  File "C:Pythonlibsite-packagesseleniumwebdriver
                emotewebdriver.py", line 157, in __init__
                    self.start_session(capabilities, browser_profile)
                  File "C:Pythonlibsite-packagesseleniumwebdriver
                emotewebdriver.py", line 252, in start_session
                    response = self.execute(Command.NEW_SESSION, parameters)
                  File "C:Pythonlibsite-packagesseleniumwebdriver
                emotewebdriver.py", line 321, in execute
                    self.error_handler.check_response(response)
                  File "C:Pythonlibsite-packagesseleniumwebdriver
                emoteerrorhandler.py", line 242, in check_response
                    raise exception_class(message, screen, stacktrace)
                selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: user data directory is already in use, please specify a unique value for --user-data-dir argument, or don't use --user-data-dir
                

              4. 錯誤堆棧跟蹤清楚地抱怨 訪問被拒絕,因為程序無法將緩存文件夾 ..ShaderCacheGPUCache 移動到 ..ShaderCacheold_GPUCache_000.因此 cache 創建失敗,隨后 Shader Cache Creation 創建失敗.雖然這些問題會引發 InvalidArgumentException,但可以在現有 Chrome 瀏覽器會話中強制打開一個新窗口.

                The error stack trace clearly complains of Access is denied as the program was unable to move the cache folder ..ShaderCacheGPUCache to ..ShaderCacheold_GPUCache_000. hence the creation of cache failed and subsequently creation of Shader Cache Creation failed. Though these issues raises the InvalidArgumentException but forcefully able to open a new window within the existing Chrome Browser Session.

                雖然拋出了錯誤,但新的 Chrome 窗口仍會啟動,但仍與已打開的 Chrome 會話連接,但新窗口無法由 WebDriver 實例.因此,您會在 url 欄中看到 data:,.

                Though the error is thrown, still the new Chrome window gets initiated but remains attached with the already opened Chrome session but the new window can't be controlled by the WebDriver instance. Hence you see data:, in the url bar.

                你需要注意幾件事:

                • 如果您使用 默認 Chrome 配置文件在同一臺測試機上訪問其他工作的網頁,則不應設置 user-data-dir 作為用戶數據,因為它仍然被您手動啟動的其他 Chrome 進程鎖定.
                  • 在上述場景中,您需要創建和使用另一個 Chrome 配置文件,您可以在 如何通過 Python 打開 Chrome 配置文件
                  • If you are using the Default Chrome Profile to access webpages for your other work on the same Test Machine, you shouldn't set user-data-dir as the User Data as it remains locked by the other Chrome process you have initiated manually.
                    • In the above scenario you need to create and use another Chrome Profile and you can find a detailed discussion in How to open a Chrome Profile through Python
                    • 在上述場景中,您需要創建和使用另一個 Chrome 配置文件,您可以在 如何在 Selenium Webdriver Python 3 中使用 Chrome 配置文件
                    • In the above scenario you need to create and use another Chrome Profile and you can find a detailed discussion in How to use Chrome Profile in Selenium Webdriver Python 3
                    • 您可以在 如何通過 Selenium 的 --user-data-dir 參數打開 Chrome 配置文件

                    這篇關于InvalidArgumentException:消息:無效參數:用戶數據目錄已在使用錯誤使用 --user-data-dir 使用 Selenium 啟動 Chrome的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                    【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                How to make a discord bot that gives roles in Python?(如何制作一個在 Python 中提供角色的不和諧機器人?)
                Discord bot isn#39;t responding to commands(Discord 機器人沒有響應命令)
                Can you Get the quot;About mequot; feature on Discord bot#39;s? (Discord.py)(你能得到“關于我嗎?Discord 機器人的功能?(不和諧.py))
                message.channel.id Discord PY(message.channel.id Discord PY)
                How do I host my discord.py bot on heroku?(如何在 heroku 上托管我的 discord.py 機器人?)
                discord.py - Automaticaly Change an Role Color(discord.py - 自動更改角色顏色)
                  <tbody id='hLgpj'></tbody>
                  • <legend id='hLgpj'><style id='hLgpj'><dir id='hLgpj'><q id='hLgpj'></q></dir></style></legend>
                      <i id='hLgpj'><tr id='hLgpj'><dt id='hLgpj'><q id='hLgpj'><span id='hLgpj'><b id='hLgpj'><form id='hLgpj'><ins id='hLgpj'></ins><ul id='hLgpj'></ul><sub id='hLgpj'></sub></form><legend id='hLgpj'></legend><bdo id='hLgpj'><pre id='hLgpj'><center id='hLgpj'></center></pre></bdo></b><th id='hLgpj'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='hLgpj'><tfoot id='hLgpj'></tfoot><dl id='hLgpj'><fieldset id='hLgpj'></fieldset></dl></div>
                        <bdo id='hLgpj'></bdo><ul id='hLgpj'></ul>
                        <tfoot id='hLgpj'></tfoot>

                        1. <small id='hLgpj'></small><noframes id='hLgpj'>

                          主站蜘蛛池模板: 一区二区三区四区在线 | 日日摸日日爽 | 一区久久 | 天天久 | 国产精品久久久久久久午夜片 | 在线国产视频观看 | 综合天天久久 | 亚洲精品一区二区在线 | 黑人精品| 久久亚洲一区 | 国产精品高潮呻吟久久久久 | 久草视频在线播放 | 欧美一区二区三区日韩 | 亚洲一区二区三区免费视频 | 精品成人免费视频 | 作爱视频免费观看 | 久久99精品久久久久久青青日本 | 国产亚洲欧美在线视频 | 日韩高清www | 99在线免费观看视频 | 日韩欧美一区二区三区免费观看 | 一区二区免费在线观看 | 国产精品久久毛片av大全日韩 | 在线免费亚洲视频 | 国产成人91视频 | 国产精品综合视频 | 午夜视频在线观看一区二区 | 成人精品在线观看 | 国产在线不卡视频 | 免费精品视频一区 | 夜夜久久 | 色婷婷在线视频 | 国产欧美日韩一区 | 日韩成人免费视频 | 中文字幕1区2区3区 日韩在线视频免费观看 | 婷婷色在线| 国产成人叼嘿视频在线观看 | 国产一区 | 亚洲日韩中文字幕一区 | 欧洲毛片| 美日韩一区二区 |