问题打开火狐 [英] Problems Opening Firefox

查看:191
本文介绍了问题打开火狐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想写一个Python脚本打开一个网址,但我不断收到错误,当我尝试使用它:

I'm trying to write a Python script to open a URL, but I keep getting errors when I try to use it:

import webbrowser

firefox = webbrowser.get('mozilla')

这是错误:

Traceback (most recent call last):
  File "C:\Users\Gelu\Documents\CSCI\Image URL Generator\src\Generator.py", line 8, in <module>
    firefox = webbrowser.get('mozilla')
  File "C:\Program Files\Python31\lib\webbrowser.py", line 53, in get
    raise Error("could not locate runnable browser")
webbrowser.Error: could not locate runnable browser

任何想法,为什么这不工作?

Any ideas why this isn't working?

推荐答案

我觉得你试图打开Firefox的,对不对?

I think you are trying to open Firefox, right?

firefox = webbrowser.get('firefox')

作品。从文档,浏览器类型。

这篇关于问题打开火狐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆