Skip to content
This repository has been archived by the owner on May 19, 2022. It is now read-only.

Icon 行报错, Python 2.7 #1

Closed
HisenZhang opened this issue Feb 27, 2018 · 1 comment
Closed

Icon 行报错, Python 2.7 #1

HisenZhang opened this issue Feb 27, 2018 · 1 comment

Comments

@HisenZhang
Copy link

HisenZhang commented Feb 27, 2018

这一行关于icon的会报错
root.iconbitmap(os.path.join(base_dir, 'ico.ico'))

Traceback (most recent call last):
File "idcardgenerator.py", line 156, in
root.iconbitmap(os.path.join(base_dir, 'ico.ico'))
File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1702, in wm_iconbitmap
return self.tk.call('wm', 'iconbitmap', self._w, bitmap)
_tkinter.TclError: bitmap "usedres/ico.ico" not defined


目前的解决方法是注释掉....

@HisenZhang HisenZhang changed the title icon Icon 行出错, Python 2.7 Feb 27, 2018
@HisenZhang HisenZhang changed the title Icon 行出错, Python 2.7 Icon 行报错, Python 2.7 Feb 27, 2018
@airob0t
Copy link
Owner

airob0t commented Feb 27, 2018

此方法要求文件在同一目录,由于更改过资源文件路径导致出错。这行代码是设置图标,不影响,可以注释掉。

@airob0t airob0t closed this as completed Feb 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants