Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TclError: Item already exists #26

Open
lepmik opened this issue Sep 20, 2021 · 1 comment
Open

TclError: Item already exists #26

lepmik opened this issue Sep 20, 2021 · 1 comment

Comments

@lepmik
Copy link

lepmik commented Sep 20, 2021

Hi, I'm unable to get this to work, is it a bug in tkFileBrowser?

from tkfilebrowser import askopendirname
askopendirname(initialdir='/')
---------------------------------------------------------------------------
TclError                                  Traceback (most recent call last)
/tmp/ipykernel_533702/3888443447.py in <module>
      1 from tkfilebrowser import askopendirname
----> 2 askopendirname(initialdir='/')

~/.virtualenvs/expipe/lib/python3.8/site-packages/tkfilebrowser/functions.py in askopendirname(parent, title, **kwargs)
     59             enable the user to create new folders if True (default)
     60     """
---> 61     dialog = FileBrowser(parent, mode="opendir", multiple_selection=False,
     62                          title=title, **kwargs)
     63     dialog.wait_window(dialog)

~/.virtualenvs/expipe/lib/python3.8/site-packages/tkfilebrowser/filebrowser.py in __init__(self, parent, initialdir, initialfile, mode, multiple_selection, defaultext, title, filetypes, okbuttontext, cancelbuttontext, foldercreation, **kw)
    394             else:
    395                 txt = l[1]
--> 396             self.left_tree.insert("", "end", iid=l[0],
    397                                   text=txt,
    398                                   image=self.im_folder)

/usr/lib/python3.8/tkinter/ttk.py in insert(self, parent, index, iid, **kw)
   1359         opts = _format_optdict(kw)
   1360         if iid is not None:
-> 1361             res = self.tk.call(self._w, "insert", parent, index,
   1362                 "-id", iid, *opts)
   1363         else:

TclError: Item /mnt already exists
@esalkin1
Copy link

I am having the same issue for the past few weeks. I'm not a programmer but I suspect the solution may be related to this:
hwstar/BOMtools#2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants