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

error when build xspress, line 357 in build_xspress3.py #48

Open
l123173 opened this issue Nov 30, 2023 · 6 comments
Open

error when build xspress, line 357 in build_xspress3.py #48

l123173 opened this issue Nov 30, 2023 · 6 comments

Comments

@l123173
Copy link

l123173 commented Nov 30, 2023

hi,
I met a question during install the module, centos 7, x64.
after type: python build_xspress3.py all, got:
"build_xspress3.py line 357 "
out.append(f'{key}={subs[key]}')"

And i used the py last year, it was ok.
Now i do not know why it happened.

@newville
Copy link
Contributor

@l123173 Sorry for the trouble. I bet that is a Python2 vs. Python3 problem. Does it work to replace
(at

out.append(f'{key}={subs[key]}')
)

                out.append(f'{key}={subs[key]}')

with

                out.append('%s=%s' % (key, subs[key]))

It looks like there are a few more places where Python3-only f-strings crept in, but those may not impact your build...

@newville
Copy link
Contributor

@l123173 I updated the build script so that it should now work with Python2

@l123173
Copy link
Author

l123173 commented Dec 5, 2023

Hi Newvile,
Yes you are right, it was the Python2 vs. Python3 problem.
Now, it works well.

We did not know that we are using Python2 in 2023.

Than you so much

@l123173
Copy link
Author

l123173 commented Dec 11, 2023

Hi Newvile,
Sorry, a little more question.

I got some error. And i think the error " Error#MCAs: create StdArray for Visualization: " was key.
But i did not change the db file.  i check for a long time and could not find how to slove it.

the error of st.cmd:
dbLoadRecords("/home/xspress3/epics/areaDetector/ADCore/db/NDTimeSeries.template", "P=XSP3_1Chan:,R=C1SCA:TS:, PORT=XSP3.C1SCA_TS, ADDR=0,TIMEOUT=1,NDARRAY_PORT=XSP3.C1SCA,NDARRAY_ADDR=1,NCHANS=16384,ENABLED=1")
dbLoadRecords("NDTimeSeriesN.template", "P=XSP3_1Chan:,R=C1SCA:TS:0:, NAME='CHAN1SCA0', PORT=XSP3.C1SCA_TS, ADDR=0,TIMEOUT=1,NCHANS=16384")
dbLoadRecords("NDTimeSeriesN.template", "P=XSP3_1Chan:,R=C1SCA:TS:1:, NAME='CHAN1SCA1', PORT=XSP3.C1SCA_TS, ADDR=1,TIMEOUT=1,NCHANS=16384")
dbLoadRecords("NDTimeSeriesN.template", "P=XSP3_1Chan:,R=C1SCA:TS:2:, NAME='CHAN1SCA2', PORT=XSP3.C1SCA_TS, ADDR=2,TIMEOUT=1,NCHANS=16384")
dbLoadRecords("NDTimeSeriesN.template", "P=XSP3_1Chan:,R=C1SCA:TS:3:, NAME='CHAN1SCA3', PORT=XSP3.C1SCA_TS, ADDR=3,TIMEOUT=1,NCHANS=16384")
dbLoadRecords("NDTimeSeriesN.template", "P=XSP3_1Chan:,R=C1SCA:TS:4:, NAME='CHAN1SCA4', PORT=XSP3.C1SCA_TS, ADDR=4,TIMEOUT=1,NCHANS=16384")
dbLoadRecords("NDTimeSeriesN.template", "P=XSP3_1Chan:,R=C1SCA:TS:5:, NAME='CHAN1SCA7', PORT=XSP3.C1SCA_TS, ADDR=5,TIMEOUT=1,NCHANS=16384")
dbLoadRecords("NDTimeSeriesN.template", "P=XSP3_1Chan:,R=C1SCA:TS:6:, NAME='CHAN1SCA8', PORT=XSP3.C1SCA_TS, ADDR=6,TIMEOUT=1,NCHANS=16384")
dbLoadRecords("NDTimeSeriesN.template", "P=XSP3_1Chan:,R=C1SCA:TS:7:, NAME='CHAN1SCA7', PORT=XSP3.C1SCA_TS, ADDR=7,TIMEOUT=1,NCHANS=16384")
dbLoadRecords("NDTimeSeriesN.template", "P=XSP3_1Chan:,R=C1SCA:TS:8:, NAME='CHAN1EventWidth', PORT=XSP3.C1SCA_TS, ADDR=8,TIMEOUT=1,NCHANS=16384")
dbLoadRecords("NDTimeSeriesN.template", "P=XSP3_1Chan:,R=C1SCA:TS:9:, NAME='CHAN1DTFactor', PORT=XSP3.C1SCA_TS, ADDR=9,TIMEOUT=1,NCHANS=16384")
dbLoadRecords("NDTimeSeriesN.template", "P=XSP3_1Chan:,R=C1SCA:TS:10:, NAME='CHAN1DTPercent', PORT=XSP3.C1SCA_TS, ADDR=10,TIMEOUT=1,NCHANS=16384")
dbLoadRecords("xspress3ChannelSCAThreshold.template", "P=XSP3_1Chan:,R=det1:,PORT=XSP3, ADDR=0, TIMEOUT=1, CHAN=1, SCA=4")
dbLoadRecords("xspress3ChannelSCALimits.template", "P=XSP3_1Chan:,R=det1:,PORT=XSP3, ADDR=0, TIMEOUT=1, CHAN=1, SCA=5")
dbLoadRecords("xspress3ChannelSCALimits.template", "P=XSP3_1Chan:,R=det1:,PORT=XSP3, ADDR=0, TIMEOUT=1, CHAN=1, SCA=6")
dbLoadRecords("xspress3ChannelDTC.template", "P=XSP3_1Chan:,R=det1:,PORT=XSP3, CHAN=1, NDARRAY_PORT=XSP3,ADDR=0,TIMEOUT=5")
dbLoadRecords("xspress3ChannelDeadtime.template", "P=XSP3_1Chan:,R=det1:,PORT=XSP3, ADDR=0, TIMEOUT=1, CHAN=1")
Record "XSP3_1Chan:C1:DeadTime_RBV" does not have a field "INP"
Error at or before ")" in path "/home/xspress3/epics/xspress3/db" file "xspress3ChannelDeadtime.template" line 12
Record "XSP3_1Chan:C1:DTFactor_RBV" does not have a field "INP"
Error#MCAs: create StdArray for Visualization:
NDStdArraysConfigure("MCA1", 5, 0, "CHAN1", 0, 0)

and these.
XSP3_1Chan:C1:DeadTime_RBV devAsynFloat64::initCommon invalid INST_IO Must be asyn( )userParams
Error (514,514) PV: XSP3_1Chan:C1:DeadTime_RBV ao: init_record
XSP3_1Chan:C1:DTFactor_RBV devAsynFloat64::initCommon invalid INST_IO Must be asyn( )userParams
Error (514,514) PV: XSP3_1Chan:C1:DTFactor_RBV ao: init_record
Error (511,511) PV: XSP3_1Chan:TIMEZONE devStringinEnvVar (init_record) Illegal INP parm field

@newville
Copy link
Contributor

@l123173 Hm, not sure, I'll see if I can reproduce that....

@newville
Copy link
Contributor

@l123173 Ah, I can see what you are getting. I believe that it was recently fixed. I'll push a release of 3.2.8, and update the build script to use the latest version....

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