load .py files from current folder fails
Closed this issue · 10 comments
on 2016-07-28, Stan emailed me:
If you remember, to let dtxrd see .py modules in a current folder, you suggested:
user_dir = os.getcwd()
sys.path.append(user_dir)
sys.path.pop()
This works with the debian package
but it doesn't seem to work if installed using
python setup.py install or with dtxrd on anaconda
one still has to include the current folder to PYTHONPATH
If you have any ideas on how to fix it please let me know.
@sstoupin: the sys.path.append(user_dir)
code is in seehdf
and it expects to find a file ccd.py
. Where is that file? I can fake that file for testing that the import technique will work.
Pete,
Thanks for your quick response.
for testing seehdf please go to
/home/beams/S1BMUSER/data/2016-2/Antipov_RCTOPO_07JUN16/CVD111-1_front
an appropriate ccd.py is in the folder
to test seehdf just run
seehdf -s -i CVD111-2_f-1__150.h5
it will raise an error message if unable to find ccd.py
Thanks!
Stan
On 07/29/2016 10:40 AM, Pete R Jemian wrote:
@sstoupin https://github.com/sstoupin: the |sys.path.append(user_dir)|
code is in |seehdf| and it expects to find a file |ccd.py|. Where is
that file? I can /fake/ that file for testing that the import technique
will work.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1 (comment), or
mute the thread
https://github.com/notifications/unsubscribe-auth/AHIwhpgD4U4FamxeMKeUE1NknsI6FtEmks5qah7ugaJpZM4JYTER.
Worked for me. Perhaps our accounts behave differently...
jemian@gov .../Antipov_RCTOPO_07JUN16/CVD111-1_front $ which seehdf
/home/oxygen/JEMIAN/Apps/anaconda/bin/seehdf
jemian@gov .../Antipov_RCTOPO_07JUN16/CVD111-1_front $ seehdf -s -i CVD111-2_f-1__150.h5
# seehdf 0.16 by Stanislav Stoupin <sstoupin@gmail.com>
nx = 1024
ny = 1024
# filename: CVD111-2_f-1__150.h5
# image: 1024 x 1024
angle [orig. units] = 457.83334542
chi [orig. units] = 2.79994
jemian@gov .../Antipov_RCTOPO_07JUN16/CVD111-1_front $
and a nice 2-D image appeared from matplotlib
If I login to our beamline computer "topo" as "s1bmuser"
then go to that folder and run same commands
which seehdf
/APSshare/anaconda/x86_64/bin/seehdf
seehdf -s -i CVD111-2_f-1__150.h5
Traceback (most recent call last):
File "/APSshare/anaconda/x86_64/bin/seehdf", line 168, in
main(options, args)
File "/APSshare/anaconda/x86_64/bin/seehdf", line 102, in main
from ccd import rbin,dx,dy,tot_range,dyn_range,fwhm_0,bkg0
ImportError: No module named ccd
Don't know why
Stan
On 07/29/2016 11:14 AM, Pete R Jemian wrote:
Worked for me. Perhaps our accounts behave differently...
|jemian@gov .../Antipov_RCTOPO_07JUN16/CVD111-1_front $ which seehdf
/home/oxygen/JEMIAN/Apps/anaconda/bin/seehdf jemian@gov
.../Antipov_RCTOPO_07JUN16/CVD111-1_front $ seehdf -s -i
CVD111-2_f-1__150.h5 # seehdf 0.16 by Stanislav Stoupin
sstoupin@gmail.com nx = 1024 ny = 1024 # filename:
CVD111-2_f-1__150.h5 # image: 1024 x 1024 angle [orig. units] =
457.83334542 chi [orig. units] = 2.79994 jemian@gov
.../Antipov_RCTOPO_07JUN16/CVD111-1_front $ |and a nice 2-D image appeared from matplotlib
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1 (comment), or
mute the thread
https://github.com/notifications/unsubscribe-auth/AHIwhryj4aOVMeXOBylPjUI_0ppx6ZSOks5qaibcgaJpZM4JYTER.
You got that message because the version of dtxrd seen from host topo is still the old one.
The update from the master DSERV to the sector DSERVs happend overnight between 2 and 7 am.
I don't have the s1bmuser password so ran the new version (from my development directory) using a different beamline account. The new version is successful:
user@host ~ $ cd /home/beams/S1BMUSER/data/2016-2/Antipov_RCTOPO_07JUN16/CVD111-1_front
user@host /tmp $ python /home/oxygen/JEMIAN/Documents/eclipse/dtxrd/seehdf -s -i CVD111-2_f-1__150.h5
# seehdf 0.16 by Stanislav Stoupin <sstoupin@gmail.com>
nx = 1024
ny = 1024
# filename: CVD111-2_f-1__150.h5
# image: 1024 x 1024
angle [orig. units] = 457.83334542
chi [orig. units] = 2.79994
user@host /tmp $
and a plot window appears
(comment was revised since this also worked in the original directory)
Thanks!
I will test again with the new version
I thought the old version already had
user_dir = os.getcwd()
sys.path.append(user_dir)
sys.path.pop()
... will let you know
Stan
On 07/29/2016 12:12 PM, Pete R Jemian wrote:
You got that message because the version of dtxrd seen from host topo is
still the old one.
The update from the master DSERV to the sector DSERVs happend overnight
between 2 and 7 am.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1 (comment), or
mute the thread
https://github.com/notifications/unsubscribe-auth/AHIwhgsPqfaBVLQYf6FRw1B1vy7uMFCeks5qajSAgaJpZM4JYTER.
installed version tested OK for me from another beamline host:
user@host ~ $ cd /home/beams/S1BMUSER/data/2016-2/Antipov_RCTOPO_07JUN16/CVD111-1_front
user@host .../Antipov_RCTOPO_07JUN16/CVD111-1_front $ which seehdf
/APSshare/anaconda/x86_64/bin/seehdf
user@host .../Antipov_RCTOPO_07JUN16/CVD111-1_front $ seehdf -s -i CVD111-2_f-1__150.h5
# seehdf 0.16 by Stanislav Stoupin <sstoupin@gmail.com>
nx = 1024
ny = 1024
# filename: CVD111-2_f-1__150.h5
# image: 1024 x 1024
angle [orig. units] = 457.83334542
chi [orig. units] = 2.79994
If you agree, we can close this issue on GitHub
Yes. I just tried and it also works for s1bmuser@topo
The issue can be closed.
Thanks!
Stan
On 07/31/2016 02:17 PM, Pete R Jemian wrote:
installed version tested OK for me from another beamline host:
|user@host ~ $ cd /home/beams/S1BMUSER/data/2016-2/Antipov_RCTOPO_07JUN16/CVD111-1_front
user@host .../Antipov_RCTOPO_07JUN16/CVD111-1_front $ which seehdf
/APSshare/anaconda/x86_64/bin/seehdf
user@host .../Antipov_RCTOPO_07JUN16/CVD111-1_front $ seehdf -s -i CVD111-2_f-1__150.h5seehdf 0.16 by Stanislav Stoupin sstoupin@gmail.com
nx = 1024
ny = 1024filename: CVD111-2_f-1__150.h5
image: 1024 x 1024
angle [orig. units] = 457.83334542
chi [orig. units] = 2.79994
|If you agree, we can close this issue on GitHub
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1 (comment), or
mute the thread
https://github.com/notifications/unsubscribe-auth/AHIwhmgeNBUwLQt3ZnZo_SlMuUSHBwGFks5qbPTOgaJpZM4JYTER.