fermi-ad / acsys-python

Python module to access the Fermilab Control System
MIT License
8 stars 4 forks source link

acsys.sync issue after upgrading to 0.10.0 #21

Closed kjhazelwood closed 3 years ago

kjhazelwood commented 3 years ago

After upgrading to 0.10.0 from 0.9.10, import acsys.sync fails with the following:

File "/home/kjh/.local/lib/python3.6/site-packages/acsys/sync/__init__.py", line 6, in <module>
    import acsys.sync.syncd_protocol as syncd_protocol
AttributeError: module 'acsys' has no attribute 'sync'
rneswold commented 3 years ago

c4f7a3f7072e57333a89c3f15cec23d1b6f61778 added that import line. It should probably just be

import syncd_protocol

And didn't this work before adding the import? All references to protocol messages already have the module path.

rneswold commented 3 years ago

This also illustrates why we need a test suite to catch regressions. 😄

beauremus commented 3 years ago

Sync was using import acsys.sync.syncd_protocol as syncd_protocol and because this definition was in the __init__.py it conflicted with the file named synd_protocol.py in the sync subpackage.

kjhazelwood commented 3 years ago

This fixed the problem, thanks.