recherche

Maison  >  Questions et réponses  >  le corps du texte

python - 使用webdriver.PhantomJS()出错


请问各位大神,这是什么情况???

巴扎黑巴扎黑2888 Il y a quelques jours322

répondre à tous(2)je répondrai

  • 大家讲道理

    大家讲道理2017-04-17 17:35:38

    Redémarrez votre ordinateur et essayez.

    répondre
    0
  • PHP中文网

    PHP中文网2017-04-17 17:35:38

    详见http://stackoverflow.com/questions/36153...
    Résolu en changeant la fonction dans selenium.webdriver.phantomjs.service.py comme suit :

    était

    def send_remote_shutdown_command(self):
        if self._cookie_temp_file:
                os.remove(self._cookie_temp_file)
    

    après avoir ajouté la construction try/sauf :

    def send_remote_shutdown_command(self):
        try:
            if self._cookie_temp_file:
                os.remove(self._cookie_temp_file)
        except PermissionError:
            pass

    répondre
    0
  • Annulerrépondre