Skip to content

Commit

Permalink
Final, tested version
Browse files Browse the repository at this point in the history
Signed-off-by: Jun Jiang <[email protected]>
  • Loading branch information
Jun-Jiang-92 committed Nov 22, 2024
1 parent fb0f577 commit 4a61e0a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions ebcmeasurements/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@

try:
from .Beckhoff import AdsDataSourceOutput
except (ImportError, FileNotFoundError) as e:
# If TwinCAT is not installed in system, it will cause an error as 'TcAdsDll.dll' does not exist. See:
# https://github.com/stlehmann/pyads/issues/105
# https://stackoverflow.com/questions/76305160/windows-10-python-pyads-library-error-could-not-find-module-tcadsdll-dll
except FileNotFoundError as e:
# Without TwinCAT installed in system, 'FileNotFoundError' will be raised by Pyads due to missing 'TcAdsDll.dll'.
# Ref1: https://github.com/stlehmann/pyads/issues/105
# Ref2: https://stackoverflow.com/questions/76305160/windows-10-python-pyads-library-error-could-not-find-module-tcadsdll-dll
logging.warning(
f"TwinCAT not installed in the system, 'Beckhoff' submodule will not be available. Original error: {e}")
f"Without TwinCAT installed on the system, 'AdsDataSourceOutput' submodule will not be available. "
f"Original error: {e}")
except ImportError as e:
logging.error(f"Failed to import 'AdsDataSourceOutput': {e}")

# Configure the root logger with a default leve and format
logging.basicConfig(
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='EBC-Measurements',
version='1.2.0',
version='1.2.1',
author='RWTH Aachen University, E.ON Energy Research Center, '
'Institute for Energy Efficient Buildings and Indoor Climate',
author_email='[email protected]',
Expand Down

0 comments on commit 4a61e0a

Please sign in to comment.