Hi,

Trying to test my OAK-D Pro W and OAK-D Lite with depthai_viewer but it always fails to start with that message:

$ python3 -m depthai_viewer

[2024-06-05T06:16:49Z WARN winit::platform_impl::platform::x11] Unsupported locale "en_IL". Restoring default locale "".

thread 'ThreadId(1)' panicked at 'Failed to open input method: PotentialInputMethods {

xmodifiers: Some(

PotentialInputMethod {

name: "@im=ibus",

successful: Some(

false,

),

},

),

fallbacks: [

PotentialInputMethod {

name: "@im=local",

successful: Some(

false,

),

},

PotentialInputMethod {

name: "@im=",

successful: Some(

false,

),

},

],

_xim_servers: Ok(

[

"@im=ibus",

],

),

}', winit-0.28.7/src/platform_impl/linux/x11/mod.rs:178

6: core::panicking::panic_fmt

at core/src/panicking.rs:72:14

7: winit::platform_impl::platform::x11::EventLoop<T>::new

8: winit::platform_impl::platform::EventLoop<T>::new

9: eframe::native::run::with_event_loop

10: eframe::run_native

Troubleshooting Rerun: https://www.rerun.io/docs/getting-started/troubleshooting

The thing is that depthai_demo.py works well.

What can be done?

It seems like the locale settings on your computer play a role here. Would you be able to show us the output of locale command?

Here you go:

$ locale

LANG=en_IL

LANGUAGE=en_IL:en

LC_CTYPE="en_IL"

LC_NUMERIC="en_IL"

LC_TIME="en_IL"

LC_COLLATE="en_IL"

LC_MONETARY="en_IL"

LC_MESSAGES="en_IL"

LC_PAPER="en_IL"

LC_NAME="en_IL"

LC_ADDRESS="en_IL"

LC_TELEPHONE="en_IL"

LC_MEASUREMENT="en_IL"

LC_IDENTIFICATION="en_IL"

LC_ALL=

Could you try sudo locale-gen "en_IL" , then try to start depthai-viewer again.

after locale-gen command I get:

Generating locales (this might take a while)...

en_IL.UTF-8... done

Generation complete.

and then:

$ python3 -m depthai_viewer

2024-06-05T10:10:28Z WARN winit::platform_impl::platform::x11] Unsupported locale "en_IL". Restoring default locale "".

thread 'ThreadId(1)' panicked at 'Failed to open input method: PotentialInputMethods {

xmodifiers: Some(

PotentialInputMethod {

name: "@im=ibus",

successful: Some(

false,

),

},

),

fallbacks: [

PotentialInputMethod {

name: "@im=local",

successful: Some(

false,

),

},

PotentialInputMethod {

name: "@im=",

successful: Some(

false,

),

},

],

_xim_servers: Ok(

[

"@im=ibus",

],

),

}', winit-0.28.7/src/platform_impl/linux/x11/mod.rs:178

6: core::panicking::panic_fmt

at core/src/panicking.rs:72:14

7: winit::platform_impl::platform::x11::EventLoop<T>::new

8: winit::platform_impl::platform::EventLoop<T>::new

9: eframe::native::run::with_event_loop

10: eframe::run_native

Troubleshooting Rerun: https://www.rerun.io/docs/getting-started/troubleshooting

Interesting, for me even setting my locale to en_IL doesn't result in an error like you are getting.

filip@filip:~$ locale
LANG=en_IL
LANGUAGE=
LC_CTYPE="en_IL"
LC_NUMERIC=en_IL
LC_TIME=en_IL
LC_COLLATE="en_IL"
LC_MONETARY=en_IL
LC_MESSAGES="en_IL"
LC_PAPER=en_IL
LC_NAME=en_IL
LC_ADDRESS=en_IL
LC_TELEPHONE=en_IL
LC_MEASUREMENT=en_IL
LC_IDENTIFICATION=en_IL
LC_ALL=

I also ran sudo dpkg-reconfigure locales after configuring my locale via

sudo update-locale LANG=en_IL LANGUAGE=en_IL:en LC_CTYPE="en_IL" LC_NUMERIC="en_IL" LC_TIME="en_IL" LC_COLLATE="en_IL" LC_MONETARY="en_IL" LC_MESSAGES="en_IL" LC_PAPER="en_IL" LC_NAME="en_IL" LC_ADDRESS="en_IL" LC_TELEPHONE="en_IL" LC_MEASUREMENT="en_IL" LC_IDENTIFICATION="en_IL" LC_ALL=

Do you thing the absense of the paranthesis "en_IL" affect it?

That's mine for comparison

$ locale

LANG=en_IL

LANGUAGE=en_IL:en

LC_CTYPE="en_IL"

LC_NUMERIC="en_IL"

LC_TIME="en_IL"

LC_COLLATE="en_IL"

LC_MONETARY="en_IL"

LC_MESSAGES="en_IL"

LC_PAPER="en_IL"

LC_NAME="en_IL"

LC_ADDRESS="en_IL"

LC_TELEPHONE="en_IL"

LC_MEASUREMENT="en_IL"

LC_IDENTIFICATION="en_IL"

LC_ALL=