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

Error initializing Tkinter! #16

Open
FoysalM opened this issue Aug 31, 2020 · 6 comments
Open

Error initializing Tkinter! #16

FoysalM opened this issue Aug 31, 2020 · 6 comments

Comments

@FoysalM
Copy link

FoysalM commented Aug 31, 2020

Hello,

I'm trying to run the application, but I'm getting the following error when running the startup command:

running....
No protocol specified
No protocol specified
Error initializing Tkinter!

Shutting down

Press any key
Traceback (most recent call last):
  File "PiCameraApp.py", line 1104, in Run
    win = Tk()
  File "/usr/lib/python3.7/tkinter/__init__.py", line 2023, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: couldn't connect to display ":10.0"

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "PiCameraApp.py", line 1130, in <module>
    Run()
  File "PiCameraApp.py", line 1107, in Run
    raw_input()
NameError: name 'raw_input' is not defined

I'm quite new RPi and Python so still getting to grips with it all. Thanks in advance,

@Kunthan
Copy link

Kunthan commented Oct 21, 2020

Hello,
I have the same issue. Did you find a solution? Thank you

@andrewrice
Copy link

Hi, I'm having the same issue. Did you ever resolve it @FoysalM?

@Mitchellscot
Copy link

Have you guys tried python3 and not just python (I had that issue once)

@FoysalM
Copy link
Author

FoysalM commented Dec 10, 2021

Hi, I'm having the same issue. Did you ever resolve it @FoysalM?

@andrewrice My project was a lockdown one, and I've not gone back to it since encountering this problem, so unfortunately not. But it seems as mentioned above, Python3 might be the way to go? Not sure when I'll get a chance to test it, but if you have any success, please do post it here and mark this issue as resolved.

@andrewrice
Copy link

Hi, it seems the issue I was having is related to trying to execute it via Remote Desktop (from a Windows 10 machine). When I tried just now to run it in a native session directly on the Pi with mouse and keyboard, it worked as expected.

I presume the issue has to do with the application not knowing how to render the camera display in a remote desktop session.

@FoysalM, do you remember if you were using remote desktop when the error occurred?

@jyang526843
Copy link

I searched online and it works for me: for python3, you need to use "input()" instead of "raw_input()"

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

5 participants