python3-krakenex icon indicating copy to clipboard operation
python3-krakenex copied to clipboard

Support Conda installation

Open kscheung1228 opened this issue 9 years ago • 6 comments

Versions

OS:       
Python:   
krakenex: 0.1.4

What are you trying to achieve?

Try to perform basic balance checking in the examples https://github.com/veox/python3-krakenex/blob/master/examples/print-account-balance.py

# code sample

import krakenex

k = krakenex.API()

# next raw comment line added by veox

What do you expect to happen?

I expect it to show the balance

What happens instead?

It doesnt run , i believe this is because of the version installed doesnt have the API yet ?

# error message
Traceback (most recent call last):
  File "krakenex.py", line 1, in <module>
    import krakenex
  File "/Users/kashingcheung/Desktop/Coursera/AnacondaProjects/Kraken/krakenex.py", line 3, in <module>
    k = krakenex.API()
AttributeError: module 'krakenex' has no attribute 'API'

kscheung1228 avatar Aug 20 '17 02:08 kscheung1228

Version 0.1.4 does have API exported.

0.1.4 is the current stable. API has been there since version 0.0.1 (i.e. always).

As per the issue title... Do you mean the distribution and its package manager?..

veox avatar Aug 21 '17 14:08 veox

I thought it is version issues thats why I point it to the distribution and its package manager? In that case , my issues is pretty srtaight forward - I use the example

However, it comes back with below error

# error message
Traceback (most recent call last):
  File "krakenex.py", line 1, in <module>
    import krakenex
  File "/Users/kashingcheung/Desktop/Coursera/AnacondaProjects/Kraken/krakenex.py", line 3, in <module>
    k = krakenex.API()
AttributeError: module 'krakenex' has no attribute 'API'

kscheung1228 avatar Aug 21 '17 14:08 kscheung1228

So... You've created a file called krakenex.py, to which you've copied the contents of examples/print-account-balance.py. Correct?

If so, you're shadowing the actual krakenex module.

veox avatar Aug 22 '17 11:08 veox

That is, don't name your script same as the package.

veox avatar Aug 22 '17 11:08 veox

Did the above advice help resolve the issue?

veox avatar Sep 16 '17 19:09 veox

Yes. Thanks !

Noel Maersk [email protected] 於 2017年9月17日 03:36 寫道:

Did the above advice help resolve the issue?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

kscheung1228 avatar Sep 17 '17 13:09 kscheung1228