-
Notifications
You must be signed in to change notification settings - Fork 6
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
TypeError in Version2.0.1 #278
Comments
@nielsenmb - is this anticipated in 2.0.1? |
Hi Shijie,
The star class isn't currently functioning with the updates in v2.0.1.
I think your best bet is to look at one of the example notebooks that
should be in the main directory of the repo.
Hope that helps!
…On Mon, 23 Sept 2024, 09:31 Guy Davies, ***@***.***> wrote:
@nielsenmb <https://github.com/nielsenmb> - is this anticipated in 2.0.1?
—
Reply to this email directly, view it on GitHub
<#278 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEJWO336XDG636TY6NJWQALZX7GXDAVCNFSM6AAAAABOVDQNKWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRXGU2DOMZYGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi @nielsenmb , The error listed above is the one I encountered when running docs/example-star.ipynb |
Hi @diyiliaoya, Could you post the error message from example-star here together with your os details and I will look in to it. Thanks - Guy |
Hi @grd349 ,
TypeError Traceback (most recent call last)
Cell In[9], [line 1](vscode-notebook-cell:?execution_count=9&line=1)
----> [1](vscode-notebook-cell:?execution_count=9&line=1) st = pb.star(ID, pg, numax, dnu, teff, bp_rp)
File ~/anaconda3/envs/pbjam2/lib/python3.12/site-packages/pbjam/core.py:916, in star.__init__(self, ID, f, s, addObs, outpath, priorpath)
[912](https://file+.vscode-resource.vscode-cdn.net/home/lishijie/Tools/PBjam/~/anaconda3/envs/pbjam2/lib/python3.12/site-packages/pbjam/core.py:912) def __init__(self, ID, f, s, addObs, outpath=None, priorpath=None):
[914](https://file+.vscode-resource.vscode-cdn.net/home/lishijie/Tools/PBjam/~/anaconda3/envs/pbjam2/lib/python3.12/site-packages/pbjam/core.py:914) self.__dict__.update((k, v) for k, v in locals().items() if k not in ['self'])
--> [916](https://file+.vscode-resource.vscode-cdn.net/home/lishijie/Tools/PBjam/~/anaconda3/envs/pbjam2/lib/python3.12/site-packages/pbjam/core.py:916) self.outpath = IO._set_outpath(ID, self.outpath)
[918](https://file+.vscode-resource.vscode-cdn.net/home/lishijie/Tools/PBjam/~/anaconda3/envs/pbjam2/lib/python3.12/site-packages/pbjam/core.py:918) if priorpath is None:
[919](https://file+.vscode-resource.vscode-cdn.net/home/lishijie/Tools/PBjam/~/anaconda3/envs/pbjam2/lib/python3.12/site-packages/pbjam/core.py:919) self.priorpath = IO.get_priorpath()
File ~/anaconda3/envs/pbjam2/lib/python3.12/site-packages/pbjam/IO.py:895, in _set_outpath(ID, rootPath)
[892](https://file+.vscode-resource.vscode-cdn.net/home/lishijie/Tools/PBjam/~/anaconda3/envs/pbjam2/lib/python3.12/site-packages/pbjam/IO.py:892) rootPath = os.getcwd()
[894](https://file+.vscode-resource.vscode-cdn.net/home/lishijie/Tools/PBjam/~/anaconda3/envs/pbjam2/lib/python3.12/site-packages/pbjam/IO.py:894) if not os.path.basename == ID:
--> [895](https://file+.vscode-resource.vscode-cdn.net/home/lishijie/Tools/PBjam/~/anaconda3/envs/pbjam2/lib/python3.12/site-packages/pbjam/IO.py:895) path = os.path.join(*[rootPath, f'{ID}'])
[896](https://file+.vscode-resource.vscode-cdn.net/home/lishijie/Tools/PBjam/~/anaconda3/envs/pbjam2/lib/python3.12/site-packages/pbjam/IO.py:896) else:
[897](https://file+.vscode-resource.vscode-cdn.net/home/lishijie/Tools/PBjam/~/anaconda3/envs/pbjam2/lib/python3.12/site-packages/pbjam/IO.py:897) path = rootPath
File <frozen posixpath>:76, in join(a, *p)
TypeError: expected str, bytes or os.PathLike object, not tuple Environment: |
Thanks - The new syntax for running can be found in ... https://github.com/grd349/PBjam/blob/master/example-Star.ipynb The docs/example-Star.ipynb is out of date and should be removed/updated. @diyiliaoya Could you see if the new syntax fixes your error? Thanks, Guy |
Hi @grd349 , It still can't work. First, you need to change ModuleNotFoundError Traceback (most recent call last)
Cell In[21], line 4
2 get_ipython().run_line_magic('autoreload', '2')
3 from pbjam import IO
----> 4 from pbjam.star import star Next, S = star('KIC10963065', f, s, addObs) gives an error like this: AttributeError Traceback (most recent call last)
Cell In[20], [line 1](vscode-notebook-cell:?execution_count=20&line=1)
----> [1](vscode-notebook-cell:?execution_count=20&line=1) S = star('KIC10963065', f, s, addObs)
File ~/anaconda3/envs/pbjam2/lib/python3.12/site-packages/pbjam/core.py:919, in star.__init__(self, ID, f, s, addObs, outpath, priorpath)
[916](https://file+.vscode-resource.vscode-cdn.net/home/lishijie/Tools/PBjam/~/anaconda3/envs/pbjam2/lib/python3.12/site-packages/pbjam/core.py:916) self.outpath = IO._set_outpath(ID, self.outpath)
[918](https://file+.vscode-resource.vscode-cdn.net/home/lishijie/Tools/PBjam/~/anaconda3/envs/pbjam2/lib/python3.12/site-packages/pbjam/core.py:918) if priorpath is None:
--> [919](https://file+.vscode-resource.vscode-cdn.net/home/lishijie/Tools/PBjam/~/anaconda3/envs/pbjam2/lib/python3.12/site-packages/pbjam/core.py:919) self.priorpath = IO.get_priorpath()
AttributeError: module 'pbjam.IO' has no attribute 'get_priorpath' |
@diyiliaoya Thanks. I can't recreate your bug right now, but I have another bug to solve first. I'll continue to look at this. |
OK,Thanks! |
When I run the star class like this:
st = pb.star(ID, pg, numax, dnu, teff, bp_rp)
TypeError will show:
The text was updated successfully, but these errors were encountered: