Hi Jessica,

I think that your yt installation needs to be updated. There was a change to yt's config system earlier this year. If you have yt installed from source, go into the source directory and do:
git pull origin master
pip install -e .

Britton

On Fri, Jun 18, 2021 at 2:41 AM Jessica López <jessayel.123@gmail.com> wrote:
Hello,
I've installed yt and yt_astro_analysis since the source as well as rockstar-galaxies (according to the instructions in the web page) in order to use the halo finder. 
Then, in my script I have

from yt.extensions.astro_analysis.halo_analysis import HaloCatalog
import yt

data=yt.load("/home/user/Programas/enzo-dev/run/CosmologySimulation/amr_cosmology/DD0010/DD0010")

halo=HaloCatalog(data_ds=data,finder_method='rockstar')
halo.create()

However it appears the error message

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-5-3ebc8a5b69aa> in <module>
      5 es = yt.load("/home/jessica/Programas/enzo-dev/run/CosmologySimulation/amr_cosmology/DD0010/DD0010", "Enzo")
      6 hc = HaloCatalog(data_ds=es, finder_method='rockstar', finder_kwargs={"num_readers": 2, "num_writers": 4})
----> 7 hc.create()

~/Programas/yt_astro_analysis/yt_astro_analysis/halo_analysis/halo_catalog/halo_catalog.py in create(self, save_halos, save_output, njobs, dynamic)
    331         """
    332 
--> 333         self._run(save_halos, save_output,
    334                   njobs=njobs, dynamic=dynamic)
    335 

~/.local/lib/python3.8/site-packages/yt/utilities/parallel_tools/parallel_analysis_interface.py in barrierize(*args, **kwargs)
    299     def barrierize(*args, **kwargs):
    300         if not parallel_capable:
--> 301             return func(*args, **kwargs)
    302         mylog.debug("Entering barrier before %s", func.__name__)
    303         comm = _get_comm(args)

~/Programas/yt_astro_analysis/yt_astro_analysis/halo_analysis/halo_catalog/halo_catalog.py in _run(self, save_halos, save_catalog, njobs, dynamic)
    222         # Find halos.
    223         if self.halos_ds is None:
--> 224             self.finder_method(self)
    225             return
    226 

~/Programas/yt_astro_analysis/yt_astro_analysis/halo_analysis/halo_catalog/halo_finding_methods.py in __call__(self, hc)
     37 
     38     def __call__(self, hc):
---> 39         return self.function(hc, *self.args, **self.kwargs)
     40 
     41 def _hop_method(hc, **finder_kwargs):

~/Programas/yt_astro_analysis/yt_astro_analysis/halo_analysis/halo_catalog/halo_finding_methods.py in _rockstar_method(hc, **finder_kwargs)
     85 
     86     ds = hc.data_ds
---> 87     rh = RockstarHaloFinder(ds, **finder_kwargs)
     88     rh.run()
     89 

~/Programas/yt_astro_analysis/yt_astro_analysis/halo_analysis/halo_finding/rockstar/rockstar.py in __init__(self, ts, num_readers, num_writers, outbase, particle_type, star_types, force_res, initial_metric_scaling, non_dm_metric_scaling, suppress_galaxies, total_particles, dm_only, particle_mass, min_halo_size)
    212         # Decide how we're working.
    213         if ytcfg.get("yt", "inline"):
--> 214             self.runner = InlineRunner()
    215         else:
    216             self.runner = StandardRunner(num_readers, num_writers)

~/Programas/yt_astro_analysis/yt_astro_analysis/halo_analysis/halo_finding/rockstar/rockstar.py in __init__(self)
     42     def __init__(self):
     43         # If this is being run inline, num_readers == comm.size, always.
---> 44         psize = ytcfg.get("yt", "internals", "global_parallel_size")
     45         self.num_readers = psize
     46         # No choice for you, everyone's a writer too!

~/.local/lib/python3.8/site-packages/yt/config.py in get(self, section, option, *args, **kwargs)
    135 
    136     def get(self, section, option, *args, **kwargs):
--> 137         val = super(YTConfigParser, self).get(section, option, *args, **kwargs)
    138         return os.path.expanduser(os.path.expandvars(val))
    139 

TypeError: get() takes 3 positional arguments but 4 were given
-------------------------------------------------------------------------
How can I fix this?

Thank you in advance
_______________________________________________
yt-users mailing list -- yt-users@python.org
To unsubscribe send an email to yt-users-leave@python.org
https://mail.python.org/mailman3/lists/yt-users.python.org/
Member address: brittonsmith@gmail.com