Main Menu

Yet Another Price Feed Mod

Started by emski, October 04, 2014, 11:42:19 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kokojie

xeroc, why does your script lock the wallet after updating feed? the delegate needs an unlocked wallet to run?

kokojie

Quote from: xeroc ¯\_(ツ)_/¯ on March 15, 2015, 04:08:46 PM
i'd guess you have installed prettytable into python2 .. maybe there ia a separate pip3 or so for python3 .. else you can try easy_install3 .. dependa on your linux distribution ..

Holy shit, there's indeed a "pip3" command.  Your script now works now for me. Thanks for all your help.

cube

Quote from: kokojie on March 13, 2015, 02:33:24 PM
I'm getting a "unknown error - yahoo" now when I run the script. Anyone else getting this?

You may try this change and see if it helps.

<code>

   #yahooprices =  response.text.split( '\r\n' )
   yahooprices =  response.text.replace('\r','').split( '\n' )

</code>
ID: bitcube
bitcube is a dedicated witness and committe member. Please vote for bitcube.

xeroc

i'd guess you have installed prettytable into python2 .. maybe there ia a separate pip3 or so for python3 .. else you can try easy_install3 .. dependa on your linux distribution ..

kokojie

xeroc, I did "pip install prettytable", and it tell me successfully installed prettytable

Then I get the same error when I run your script: No module named 'prettytable'

What did I do wrong?

xeroc

Yup .. i.stall ftom that repo .. also need prettytable ..
Read the README in bitshares-pytools too

kokojie

#46
Quote from: xeroc ¯\_(ツ)_/¯ on March 14, 2015, 07:50:37 PM
You need python3!!

ok so I needed to run "python3 main.py ALL", but then I get this error:
File "main.py", line 4, in <module>
import bitsharesrpc
ImportError: No module named 'bitsharesrpc'

Do I need to install this too? https://github.com/xeroc/python-bitsharesrpc

Also, it looks like I need a "PrettyTable" module too? where do I get this.

xeroc


kokojie

Quote from: xeroc ¯\_(ツ)_/¯ on March 14, 2015, 04:04:07 PM
Oh .. you run the script with

python main.py ALL

Will publish all prices implemented in the script

I certainly have to do more documentation on ALL my scripts .. give me some time please

I get an error after running that:
File "main.py", line 413
  print("Loading data: ", end="", flush=True)
                                                   ^
SyntaxError: invalid syntax

xeroc

Oh .. you run the script with

python main.py ALL

Will publish all prices implemented in the script

I certainly have to do more documentation on ALL my scripts .. give me some time please

kokojie

Quote from: xeroc ¯\_(ツ)_/¯ on March 13, 2015, 04:51:06 PM
Quote from: kokojie on March 13, 2015, 02:33:24 PM
I'm getting a "unknown error - yahoo" now when I run the script. Anyone else getting this?
I made some modifications and moved the script into bitshares-pytools on github .. please try that version

I'm using emski's script, the problem is directed at emski.

btw, I can't get your script to work, can you write some documentation on github, like where am I suppose to put the asset symbols? I don't see them in the config-example.

xeroc

Quote from: kokojie on March 13, 2015, 02:33:24 PM
I'm getting a "unknown error - yahoo" now when I run the script. Anyone else getting this?
I made some modifications and moved the script into bitshares-pytools on github .. please try that version

kokojie

I'm getting a "unknown error - yahoo" now when I run the script. Anyone else getting this?

xeroc

Quote from: emski on February 15, 2015, 05:52:45 PM
EDIT: Just to note that currently bter returns an error so it is ignored by the script anyway
unless you set it to >0.7 or then the script will stop .. at least my implementation

emski

#38
Quote from: xeroc ¯\_(ツ)_/¯ on February 15, 2015, 05:18:55 PM
I recommend every delegate to set bter_trust_level to 0.0 in the config file

Given the recent events this might be a good idea.
Delegates are free to modify the configuration as they see need for it.

EDIT: Just to note that currently bter returns an error so it is ignored by the script anyway
[url="https://bitsharestalk.org/index.php/topic,9857.0.html"]https://bitsharestalk.org/index.php/topic,9857.0.html[/url]