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

Freeze with tkfiledialog #4959

Closed
soarwing52 opened this issue Oct 1, 2019 · 3 comments
Closed

Freeze with tkfiledialog #4959

soarwing52 opened this issue Oct 1, 2019 · 3 comments

Comments

@soarwing52
Copy link

soarwing52 commented Oct 1, 2019

Required Info
Camera Model { D400 }
Firmware Version (Open RealSense Viewer --> Click info)
Operating System & Version {Win (10)
Platform PC
SDK Version { legacy / 2.. }
Language {python }

Issue Description

Hi, my project is to take road survey images with D435 and gps
and I created a program with tkinter to process, output jpeg, txt, and shapefile

when I import library arcpy, everything works fine.
but if I didn't import arcpy, the tkfiledialog will freeze

since now my plan is to use pyinstaller to create exe for others, arcpy is not available and no longer needed, and here raised the issue

from tkinter import *
from tkinter import filedialog
import pyrealsense2

root = Tk()
file = filedialog.askdirectory()

this will make the window no response.

I can see that with tkinter is not a common option with rs, or which GUI is tested and would function well?

@RealSenseCustomerSupport
Copy link
Collaborator


This could be similar with #4856. Will further check internally, and see if the community can help this.

@soarwing52
Copy link
Author

soarwing52 commented Nov 1, 2019

another information:
the funciton I use is to create jpg from the bag with multiprocessing.Pool
I can use the tkfiledialog when I import it in the function.

Ex:

import tkfiledialog
import multiprocessing as mp

def rs_func():
    import pyrealsense2 as rs

if __name__ =='__main__':
    p = mp.Pool()
    tkfiledialoge()
    p.map()

as line 161-217 in my application
script

@RealSenseCustomerSupport
Copy link
Collaborator


Hi @soarwing52,

It's good to see your have the workaround to resolve this issue.

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