OpenBazaar-Client
OpenBazaar-Client copied to clipboard
NaN BTC: float division by zero
Proxying bug report given to the OpenBazaar helpdesk:
I'm getting prices shown as "NaN BTC" and an error when I try to purchase: "Reason: float division by zero"
Ok, a second person on the helpdesk has this issue.
Hi! I really want a sticker but I cannot order one! It just shows NaN BTC and I receive an error (floating point division by 0). Is it out of stock or is just an error on my end? The stickers are not limited are they?
The error seems to be related to MacOS. I tried OB on WIN and did not have any issue.
Confirmed by multiple reports. Haven't gotten many details on how to replicate though.
We think this may be connected to an issue with the bitcoinaverages api call failing. Can you find out if the same people are also unable to select a currency other than BTC?
A screen cap of the error message would be helpful too, we're not sure when it's actually occurring.
Seems to be related to OB stickers.
How come when I try to buy a OB sticker it says NaN BTC
I'm getting this error when creating a new listing, I also received the error "your local currency not available" (USD).
This was fixed on the client side in #1252
The server part of this issue is being tracked at https://github.com/OpenBazaar/OpenBazaar-Server/issues/328
I am stilling seeing "NaN BTC" on many of the listings. I am using an iMac.
@More-decentral what version of the app are you using?
@jjeffryes, I am running 1.1.3 on OSX 10.10.5
@More-decentral are you using the installer, or did you manually install the client?
This problem is caused by an outdated Python library on your Mac. Try the following steps:
- Open the terminal and type: xcode-select --install
- ruby -e "($curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- brew update
- brew doctor
- brew install openssl
- brew install libffi
- brew install python
- sudo env LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include" pip install cryptography
@jjeffryes, I downloaded the client from the OB website directly. How to use the installer?
I did update Python library on Mac. Now no more "NaN BTC" on the listings. Thank you.
@More-decentral you should be able to double click on the installer after downloading it. But it sounds like you won't need to.
@jjeffryes followed your instructions, and now NaN does not appear any more. Running OSX 10.10.5. worked better when using /usr/bin/ruby - from http://brew.sh instructions
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Is there a solution to this without require the user to open the Terminal?
@jonasbits great to hear that worked.
For 99% of our users, the current installer does this for them and everything's fine. We haven't pinned down why some users have a conflict. Possibly it's from other software that uses the same OpenSSL library but uses a different version.
Even with latest update, OB 1.1.4, all items that I want to buy dispaly NaN BTC as price. OS X El Capitan, latest update, late 2014 iMac. I download the official .dmg and drag it to the Applications folder, even deleting the OpenBazaar folder in Library/Application Support to start over with same result. Please advise. Thank you!
@smokebox46and2 have you tried the manual steps listed above?
@jjeffryes Thanks for the reply. I get a 'command unrecognized' for all commands after the xcode command and install. This command, ruby -e "($curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)", fails
maybe the ruby components are missing?
@smokebox46and2 try
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
per the suggestion from @jonasbits
I think pyinstaller does something curious where if it thinks it finds python locally installed it will go ahead and use that first and if it's an older version it causes problems. I'm not sure yet why it wouldn't just use the self-contained version.
@jjeffryes apologies, i didn't notice that. I'll try that when I get home and report back. Thanks again OB and community!
@jjeffryes @hoffmabc
It worked!
However, I had to leave off the 'pip install cryptography' part of the last command as it wasn't recognized. Hopefully it's not detrimental to leave that part off...
Thanks again
I see this bug has been around for a while... Just installed openbazaar 1.1.7 on OSX 10.11.4 and seeing most prices in NaN. My install was from this link: https://www.openbazaar.org/download.html which did not have an "install" process but rather the common on mac "drag to applications folder" process. I'm sure I could follow the terminal instructions above, but at this point Im more intersted in seeing a solution for the non-terminal friendly masses... Is there any debug info that would be helpful that I can provide?
I've reopened this issue because while we have a solution to fix the problem if they encounter it, the problem is still occurring for new users. Moreover, the fix that we have involves users digging into the terminal etc, which is unfriendly to mainstream users.
Let's get to the bottom of this and fix the root problem, and then we can close this issue.
Of course, let's not accidentally hit the close button :laughing:
Hi All,
I had the Nan btc problem on an imac running yosemite 10.10.5 because some of my music creation software was not yet compatible with Sierra and El Capitan. I was forced to upgrade to Sierra so I could install XTools. I have never used a command prompt before. Then I followed jjefryes instructions and nothing happened. Found the comment from jonasbits a bit further down, so I nervously pasted: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" into the terminal and hit enter, and it worked. The one by one I pasted in the other commands and hit enter:
brew update brew doctor brew install openssl brew install libffi brew install python
Nan BTC gone in openbazaar and miraculously my handle appeared as well and a short time later on DUO and Bazaarbay.
My question is what does this last line of code do?:
sudo env LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include" pip install cryptography
I haven't tried it yet.
Regards Neal
Hi All,
I had the Nan btc problem on an imac running yosemite 10.10.5 because some of my music creation software was not yet compatible with Sierra and El Capitan. I was forced to upgrade to Sierra so I could install XTools. I have never used a command prompt before. Then I followed jjefryes instructions and nothing happened. Found the comment from jonasbits a bit further down, so I nervously pasted: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" into the terminal and hit enter, and it worked. The one by one I pasted in the other commands and hit enter:
brew update brew doctor brew install openssl brew install libffi brew install python
Nan BTC gone in openbazaar and miraculously my handle appeared as well and a short time later on DUO and Bazaarbay.
My question is what does this last line of code do?:
sudo env LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include" pip install cryptography
I haven't tried it yet.
Regards Neal
I encountered this problem on OSX 10.11.6, with OpenBazaar-Client 1.1.7, OpenBazaar-Server commit 903ac7f157aa6a67c719affcbcacef1b325b09d1 (v0.2.3-rc4).
The problem came up when I upgraded OpenBazaar-Server to v0.2.3-rc4. Previously I was using OpenBazaar-Server commit da0c261c5b303c558075cd4666d25650d45a7509 and it did not have this problem.
Did you ensure to use python 2.7.9 or higher?