The Batchman Posted March 29, 2017 Share Posted March 29, 2017 Hey guys, I'm very interested in anything with crypto currencies like Bitcoin. I've coded something together that grabs the current Bitcoin price from the web and throws it into Houdini as a 3d text. I've also managed to get the Bitcoin price history and graph it inside Houdini. Don't know tho whom it may be useful but look around or maybe even improve it. Maybe it might create new ideas. Python code and example available in the attachment or at github. The Batchman Bitcoin.hipnc 1 Quote Link to comment Share on other sites More sharing options...
3dome Posted March 30, 2017 Share Posted March 30, 2017 just downloaded it out of curiosity. getting an error on the python sop with line 1 "import requests" it cant find that module. using H16 cheers Quote Link to comment Share on other sites More sharing options...
The Batchman Posted April 1, 2017 Author Share Posted April 1, 2017 On 3/30/2017 at 4:06 PM, 3dome said: just downloaded it out of curiosity. getting an error on the python sop with line 1 "import requests" it cant find that module. using H16 cheers Oh dear! I thought python came with the requests library by default. If you are on a Linux machine you can open up a terminal and enter the command: pip install requests If you are on a Mac or Windows machine I don't know how to get it to be honest. However I think this is a good start if you need this to work. Hope you get it working! Quote Link to comment Share on other sites More sharing options...
3dome Posted April 1, 2017 Share Posted April 1, 2017 Thanks. I'm using Windows but I think I'll find a way to get that library Quote Link to comment Share on other sites More sharing options...
Forest3d Posted April 6, 2017 Share Posted April 6, 2017 pip also works on windows if you have it installed, a very useful tool. I can't recall if it actually came with the python installer or was separate, to be honest. Quote Link to comment Share on other sites More sharing options...
felo44 Posted April 6, 2017 Share Posted April 6, 2017 You can use Anaconda (https://www.continuum.io/downloads) to get a more robust Python, with more libraries including requests, this is a data science package, so if you feel adventurous, you can play around and get more data into Houdini. Cheers, P.D. Anaconda also includes a terminal that supports pip command. 2 Quote Link to comment Share on other sites More sharing options...
Jason Posted April 7, 2017 Share Posted April 7, 2017 Note sure if totally related, but did you know that you can use http:// and ftp:// URI's directly in file fields in Houdini? For example, you can refer to an image fetched by an http request directly in COPs, textures, backgrounds or wherever you encounter image paths. PS. You can add your own -- see the FS_ReaderHelper/etc docs Quote Link to comment Share on other sites More sharing options...
The Batchman Posted April 25, 2017 Author Share Posted April 25, 2017 On 4/7/2017 at 0:54 AM, Jason said: Note sure if totally related, but did you know that you can use http:// and ftp:// URI's directly in file fields in Houdini? For example, you can refer to an image fetched by an http request directly in COPs, textures, backgrounds or wherever you encounter image paths. PS. You can add your own -- see the FS_ReaderHelper/etc docs That is really cool! Didn't know that was possible with files too. Might be helpful one day. I've noticed though that HTTPS is not supported, while HTTP is. I've tested this in my python script and also just checked this with a COP File node. Doesn't want to import anything HTTPS, the error generated from the python shell is the following. /usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:334: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html #ssl-warnings SNIMissingWarning /usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:132: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecurePlatformWarning Quote Link to comment Share on other sites More sharing options...
Jason Posted May 2, 2017 Share Posted May 2, 2017 Interesting, I didn't know that. Perhaps SideFX would have some insight if you wanted to solve this puzzle. FWIW, we have implemented our own URI handlers pointed at our asset system using that class. It can be very intuitive if done right. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.