-
Notifications
You must be signed in to change notification settings - Fork 5
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
Import error #2
Comments
Dear @anoukvlug As for the future of Thanks for understanding, Nikola |
Dear Nikola, |
Dear Anouk,
sidenote to the discussion. The new code that is in my branch = hynek_
refactoring_.... supports Python3. The Python environment is better
contained using poetry that support simple packaging and publication of the
library.
Best,
Hynek
---------- Původní e-mail ----------
Od: Anouk Vlug <[email protected]>
Komu: jajcayn/pyclits <[email protected]>
Datum: 5. 6. 2020 12:53:18
Předmět: Re: [jajcayn/pyclits] Import error (#2)
"
Dear Nikola,
Thank you for your fast and kind reply! Unfortunately it is not the right
time for me to be adventures and dive into the code.
Kind regards,
Anouk
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
(#2 (comment)), or
unsubscribe
(https://github.com/notifications/unsubscribe-auth/ACKGZPS3SCHL5O5SBA3IA5DRVDFBPANCNFSM4NTNXHXA)
.
"
|
@mafycek thanks a lot for the advice! I just installed your branch and at first sight it seems to work :) |
Ok, cool! I did not know that it should work in my branch :)
Btw. do you use virtual environment and poetry?
---------- Původní e-mail ----------
Od: Anouk Vlug <[email protected]>
Komu: jajcayn/pyclits <[email protected]>
Datum: 5. 6. 2020 14:38:46
Předmět: Re: [jajcayn/pyclits] Import error (#2)
"
@mafycek(https://github.com/mafycek) thanks a lot for the advice! I just
installed your branch and at first sight it seems to work :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
(#2 (comment)), or
unsubscribe
(https://github.com/notifications/unsubscribe-auth/ACKGZPQSOQBJCQCPKRS3Z7DRVDRNBANCNFSM4NTNXHXA)
.
"
|
Sorry, I wrote my previous message to early. I thought you meant the branch would work with python 3. So after I installed both the branch and was able able to load the package, I thought it would work. However I kept running into errors, when trying to using the functions. It won't recognize all the functions (some it does recognize though) that are actually there: e.g.:
For this I used a python environment (env not venv). I'm not familiar with poetry. |
Actually, I wouldn't really need the data_loaders function, however I thought it would be good to get the example to work. As having an example would make it easier to figure out how to solve the error that I am having with the wavelet analysis function:
I have no clue if this error would be easy to solve or if it would get tricky and I can better look for another approach to do the wavelet analysis. @mafycek do you maybe know a quick fix for this problem? Or is this going to take quite some time to solve? |
I think that the problem is in the missing __init__ file. I never used the
code but I could help you if you send me the command that teriggers the
error.
I need whole stack to investigate the issue.
…---------- Původní e-mail ----------
Od: Anouk Vlug <[email protected]>
Komu: jajcayn/pyclits <[email protected]>
Datum: 8. 6. 2020 12:40:42
Předmět: Re: [jajcayn/pyclits] Import error (#2)
"
Sorry, I wrote my previous message to early. I thought you meant the branch
would work with python 3. So after I installed both the branch and was able
able to load the package, I thought it would work. However I kept running
into errors, when trying to using the functions. It won't recognize all the
functions (some it does recognize though) that are actually there:
e.g.:
<code>AttributeError Traceback (most recent call last)
<ipython-input-19-f363db24ae29> in <module>
----> 1 nino34 = clt.data_loaders.load_enso_index("/aop1/avlug/nino34raw.txt", "3.4", start_date = date(1870, 1, 1),
2 end_date = date(2017, 7, 1), anom = False)
3
AttributeError: module 'pyclits' has no attribute 'data_loaders'
</code>
For this I used a python environment (env not venv). I'm not familiar with
poetry.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
(#2 (comment)), or
unsubscribe
(https://github.com/notifications/unsubscribe-auth/ACKGZPQEBELPGJIHJ2F5K2TRVS5Z3ANCNFSM4NTNXHXA)
.
"
|
Ok, here I see the problem. x/y return s float while x//y returns int. This
is deviation beteen Python 3 and 2.
---------- Původní e-mail ----------
Od: Anouk Vlug <[email protected]>
Komu: jajcayn/pyclits <[email protected]>
Datum: 8. 6. 2020 12:59:06
Předmět: Re: [jajcayn/pyclits] Import error (#2)
"
Actually, I wouldn't really need the data_loaders function, however I
thought it would be good to get the example to work. As having an example
would make it easier to figure out how to solve the error that I am having
with the wavelet analysis function:
<code>---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-23-4590a8ad37dc> in <module>
1 wave, period, scale, coi = wavelet_analysis.continous_wavelet(df['001'].values, dt = dt, wavelet = mother,
----> 2 dj = dj, s0 = s0, j1 = j1, k=k0)
~/Programs/miniconda3/envs/oggm_env/lib/python3.6/site-packages/pyclits/wavelet_analysis.py in continous_wavelet(X, dt, pad, wavelet, **kwargs)
137 k = np.arange(1, np.fix(n/2) + 1)
138 k *= (2. * np.pi) / (n * dt)
--> 139 k_minus = -k[int(np.fix(n-1))/2 - 1::-1]
140 k = np.concatenate((np.array([0.]), k, k_minus))
141
TypeError: slice indices must be integers or None or have an __index__ method
</code>
I have no clue if this error would be easy to solve or if it would get
tricky and I can better look for another approach to do the wavelet
analysis. @mafycek(https://github.com/mafycek) do you maybe know a quick fix
for this problem? Or is this going to take quite some time to solve?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
(#2 (comment)), or
unsubscribe
(https://github.com/notifications/unsubscribe-auth/ACKGZPQZE6NWYBQXYSHW5GDRVS77JANCNFSM4NTNXHXA)
.
"
|
The problem should be fixed in the next commit.
…---------- Původní e-mail ----------
Od: Anouk Vlug <[email protected]>
Komu: jajcayn/pyclits <[email protected]>
Datum: 8. 6. 2020 12:59:06
Předmět: Re: [jajcayn/pyclits] Import error (#2)
"
Actually, I wouldn't really need the data_loaders function, however I
thought it would be good to get the example to work. As having an example
would make it easier to figure out how to solve the error that I am having
with the wavelet analysis function:
<code>---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-23-4590a8ad37dc> in <module>
1 wave, period, scale, coi = wavelet_analysis.continous_wavelet(df['001'].values, dt = dt, wavelet = mother,
----> 2 dj = dj, s0 = s0, j1 = j1, k=k0)
~/Programs/miniconda3/envs/oggm_env/lib/python3.6/site-packages/pyclits/wavelet_analysis.py in continous_wavelet(X, dt, pad, wavelet, **kwargs)
137 k = np.arange(1, np.fix(n/2) + 1)
138 k *= (2. * np.pi) / (n * dt)
--> 139 k_minus = -k[int(np.fix(n-1))/2 - 1::-1]
140 k = np.concatenate((np.array([0.]), k, k_minus))
141
TypeError: slice indices must be integers or None or have an __index__ method
</code>
I have no clue if this error would be easy to solve or if it would get
tricky and I can better look for another approach to do the wavelet
analysis. @mafycek(https://github.com/mafycek) do you maybe know a quick fix
for this problem? Or is this going to take quite some time to solve?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
(#2 (comment)), or
unsubscribe
(https://github.com/notifications/unsubscribe-auth/ACKGZPQZE6NWYBQXYSHW5GDRVS77JANCNFSM4NTNXHXA)
.
"
|
It looks likes the pyclits package is precisely what I am looking for. However after an installation that appeared to be successful, I unfortunately I got the following error message once I tried to import the package:
@jajcayn, could you help me solving this problem?
The text was updated successfully, but these errors were encountered: