2baOrNot2ba / dreamBeam

Radio telescope beam modeling framework
https://dreambeam.readthedocs.io
ISC License
5 stars 6 forks source link

dreambeam is trying to write data into a root directory #8

Closed maaijke closed 3 years ago

maaijke commented 3 years ago

I installed dreambeam as root, but would like to run it as user. I get the following error when I run: ... File "/usr/local/lib/python3.8/site-packages/dreamBeam-0.7-py3.8.egg/dreambeam/telescopes/rt.py", line 56, in init self.feedplugin = FeedWiz()[tscopename] File "/usr/local/lib/python3.8/site-packages/dreamBeam-0.7-py3.8.egg/dreambeam/feeds/feedplugins.py", line 42, in getitem feedplugin = FeedPlugin(feed_path) File "/usr/local/lib/python3.8/site-packages/dreamBeam-0.7-py3.8.egg/dreambeam/feeds/feedplugins.py", line 70, in init os.mkdir(datadirpath) PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.8/site-packages/dreamBeam-0.7-py3.8.egg/dreambeam/telescopes/LOFAR/data' ...

2baOrNot2ba commented 3 years ago

Can you describe what steps you took for the install of dreamBeam, i.e. did you use "python setup.py install --user" in dreamBeam project directory?

maaijke commented 3 years ago

sudo python setup.py install

maaijke commented 3 years ago

I solved it for now by checking if I have actually write access to the path and changing the path otherwise (also needs to be done lateron in _gen_dpolel_hamaker) But I guess there should be a more general solution

2baOrNot2ba commented 3 years ago

I was about to say that for now could you create a directory "data" under LOFAR directory in the dreamBeam site-package installation.

I will make this (create data folder) part of the setup procedure from now on.

Thanks for reporting, Maaijke.

2baOrNot2ba commented 3 years ago

I have addressed this issue in the latest commits. Now the caching of data files is no longer deemed necessary, so there should be no writing into the installed package by default. The changes have gone into version 0.8.