Python3 and particle catalogs
Closed this issue · 3 comments
I think there's another bug related to strings in python3. The following code produces an error for me, saying there was no particle catalog with that name.
from halotools.sim_manager import CachedHaloCatalog
halocat = CachedHaloCatalog(simname="bolplanck")
print(halocat.ptcl_table)
However, I did download the corresponding particle catalog. In fact, the following code works.
from halotools.sim_manager import CachedHaloCatalog
halocat = CachedHaloCatalog(simname="bolplanck")
halocat.simname = "bolplanck" # was b'bolplanck' previously
print(halocat.ptcl_table)
I believe we had a similar issue with the halo catalogs earlier and it was fixed there.
Hmm, I thought this was resolved with PR #831, which at the time you reported resolved the issue for you. Were there any other changes to your local environment configuration in the interim?
I just tried this locally on my machine using a python 3 environment, and I cannot reproduce the bug you report. Can you reply with the version of halotools you are using. For me:
print(halotools.__version__)
0.7.dev4942
I'm sorry. I thought I updated to 0.6, but didn't actually. So yes, it was there in 0.5 but resolved in 0.6. Sorry again.
No problem, that's why I asked. This still happens to me frequently when I build master from source (not just with Halotools, but with all the packages for which I use bleeding edge versions). Occasionally, what I do is identify the install directory and obliterate all the old versions before reinstalling from source:
import halotools
print(halotools.__file__)
This will show where your active version is located on your machine. Then I just cd
to that directory, rm -rf halotools*
, and then start over with a fresh install.