Skip to content

nidaqmx breaks with tzlocal 5.4.2 due to the time conversion utilities #985

@zhindes

Description

@zhindes

Bug Report

If you have tzlocal 5.4.2, you get an error about tzlocal not being a module name.

Repro or Code Sample

$ pip install nidaqmx
$ pip install tzlocal==5.4.2
$ python system_properties.py
Traceback (most recent call last):
  File "C:\Users\zhindes\niconnect\nidaqmx-python\examples\system_properties.py", line 5, in <module>
    local_system = nidaqmx.system.System.local()
  File "C:\Users\zhindes\.pyenv\pyenv-win\versions\3.13.4\Lib\site-packages\nidaqmx\system\system.py", line 58, in local
    return System()
  File "C:\Users\zhindes\.pyenv\pyenv-win\versions\3.13.4\Lib\site-packages\nidaqmx\system\system.py", line 51, in __init__
    self._interpreter = utils._select_interpreter(grpc_options)
                        ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "C:\Users\zhindes\.pyenv\pyenv-win\versions\3.13.4\Lib\site-packages\nidaqmx\utils.py", line 214, in _select_interpreter
    from nidaqmx._library_interpreter import LibraryInterpreter
  File "C:\Users\zhindes\.pyenv\pyenv-win\versions\3.13.4\Lib\site-packages\nidaqmx\_library_interpreter.py", line 23, in <module>
    from nidaqmx._lib_time import AbsoluteTime
  File "C:\Users\zhindes\.pyenv\pyenv-win\versions\3.13.4\Lib\site-packages\nidaqmx\_lib_time.py", line 9, in <module>
    from nidaqmx._time import _convert_to_desired_timezone
  File "C:\Users\zhindes\.pyenv\pyenv-win\versions\3.13.4\Lib\site-packages\nidaqmx\_time.py", line 7, in <module>
    from tzlocal import get_localzone
ModuleNotFoundError: No module named 'tzlocal'

Your Environment

  • Operating system and version: [e.g. Windows 11 24H2, Ubuntu Linux 24.04]
  • NI-DAQmx version: [e.g. 2024 Q4]
  • nidaqmx-python version: [e.g. 1.0.1]
  • Python version [e.g. 3.11]

AB#3924419

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions