Comments (11)
I don't know what webpack is, but it isn't part of Gryphon (a grep in the repo will say the same). As well, the GDS warning there is innocuous.
Where are you navigating to with your browser? With gryphon-dashboards running you should be able to navigate to localhost:8080 and see the login screen at least.
Also, the process just pauses after those lines you posted, right? It doesn't instant quit back to the terminal?
from gryphon.
ah.. thanks.
This page https://gryphon.readthedocs.io/en/latest/dashboards.html
Has this line.
Point your web browser at localhost:8000 and you should see this login screen:
I develop with Vue & React & had another browser window pointing at 8080 - hence the message I was getting.
from gryphon.
Just to be clear it does work with localhost:8080?
I think changing the default port may have been a late change before release, I'll update the docs and mention this issue in the PR.
from gryphon.
Hi Gareth.
Yep it loads and I can login.
I've run the Simple Market Making Strategy for awhile, then attempted to select this from the Trading Menu. This is the error that occurs.
ERROR:tornado.application:Exception in exception handler
Traceback (most recent call last):
File "/Users/matt/projects/internetschminternet/gryphon/venv/lib/python2.7/site-packages/tornado/web.py", line 1597, in _execute
self._handle_request_exception(e)
File "/Users/matt/projects/internetschminternet/gryphon/venv/lib/python2.7/site-packages/tornado/web.py", line 1650, in _handle_request_exception
self.send_error(500, exc_info=sys.exc_info())
File "/Users/matt/projects/internetschminternet/gryphon/gryphon-master/gryphon/dashboards/handlers/base.py", line 48, in send_error
print str(vars(status_code))
TypeError: vars() argument must have dict attribute
I'll poke around in the source tonight and see if I can workout what is going on.
from gryphon.
That does look like you're getting a 500, but the actual stack trace is being hidden because there's an error in the exception handler. Any chance you added a print statement in base.py at line 48?
print str(vars(status_code))
from gryphon.
Thanks Gareth.
This is actually the error before the above one - I'll add the print statement as you ask tonight.
INFO:gryphon.dashboards.app:Could not find a gds credential, orderbook and other dashboards won't be operational
INFO:root:200 GET / (::1) 221.95ms - PRETTY SLOW
/Users/matt/projects/internetschminternet/gryphon/venv/lib/python2.7/site-packages/sqlalchemy/sql/sqltypes.py:242: SAWarning: Unicode type received non-unicode bind param value 'SIMPLE_MM'. (this warning may be suppressed after 10 occurrences)
(util.ellipses_string(value),))
ERROR:tornado.application:Uncaught exception GET /strategies/simple_mm (::1)
HTTPServerRequest(protocol='http', host='localhost:8080', method='GET', uri='/strategies/simple_mm', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
File "/Users/matt/projects/internetschminternet/gryphon/venv/lib/python2.7/site-packages/tornado/web.py", line 1590, in _execute
result = method(*self.path_args, **self.path_kwargs)
File "/Users/matt/projects/internetschminternet/gryphon/venv/lib/python2.7/site-packages/tornado/web.py", line 3006, in wrapper
return method(self, *args, **kwargs)
File "/Users/matt/projects/internetschminternet/gryphon/gryphon-master/gryphon/dashboards/handlers/strategies/strategy.py", line 63, in get
self.render_template('strategy.html', args=template_args)
File "/Users/matt/projects/internetschminternet/gryphon/gryphon-master/gryphon/dashboards/handlers/admin_base.py", line 109, in render_template
return self.render(template, **kwargs)
File "/Users/matt/projects/internetschminternet/gryphon/venv/lib/python2.7/site-packages/tornado/web.py", line 766, in render
html = self.render_string(template_name, **kwargs)
File "/Users/matt/projects/internetschminternet/gryphon/venv/lib/python2.7/site-packages/tornado/web.py", line 907, in render_string
return t.generate(**namespace)
File "/Users/matt/projects/internetschminternet/gryphon/venv/lib/python2.7/site-packages/tornado/template.py", line 346, in generate
return execute()
File "templates/strategy_html.generated.py", line 107, in _tt_execute
_tt_tmp = '%s %.2f' % (args['open_pl'].currency, args['open_pl'].amount) # templates/strategy.html:51 (via templates/base.html:207)
AttributeError: 'NoneType' object has no attribute 'currency'
from gryphon.
Hmm ok, let me take a closer look at this tomorrow morning.
from gryphon.
After a quick refresher on this, this is a known issue with a simple fix I've had in a branch for about a month. The issue is that open_pl in the strategy handler isn't initialized with a default value, so if the strategy has no trading history (or, I think, only a single trade such that you can't calculate a realized p&l for it), the page will error.
I'll try to merge those changes this weekend, but in the meantime if you want to fix it in your version and create a patch back to the repo, that would be appreciated too!
from gryphon.
@mattstone #38 is in progress and has multiple dashboard fixes including I believe the fix for your Nonetype issue. It'll be into master in the next day or two.
The specific fix is in this commit: 2fd690f
from gryphon.
Thanks for following this up.
from gryphon.
Just faced this same issue today while trying to monitor some simple strategies on the dashboard. Managed to avoid it by adding a simple if statement on template/strategy.html line 51, as shown below. Then noticed #47 commit 2fd690f with a much better solution already implemented.
{% if args['open_pl'] %}
<h3>{{ '%s %.2f' % (args['open_pl'].currency, args['open_pl'].amount) }}</h3>
{% end %}
So, if the branch is ok, could you please merge dashboard_overhaul when possible? Just merged locally without any conflict resolution.
from gryphon.
Related Issues (20)
- Bitstamp : subaccount API invalid signature HOT 3
- The homepage readme "gryphon-exe" is a typo? HOT 2
- exchange.market_order requires a price ? HOT 4
- Document sim_exchange HOT 1
- Strategy: Auditing cancels orders ? HOT 1
- Running [strat_name].py leads to .config file not being found. Original fix did not resolve this HOT 2
- Looking for feedback: Strategies and Strategy Ledgers are not intuitive to users HOT 1
- Add support for BitMex exchange. HOT 1
- Keeping track of dependencies HOT 2
- Running a strategy from a Jupyter Notebook HOT 1
- 'module' object has no attribute 'Money' HOT 4
- Setting up Data Service HOWTO HOT 1
- AttributeError: type object 'IOLoop' has no attribute 'initialized' HOT 2
- Slack invite link is down HOT 6
- AttributeError: 'NoneType' object has no attribute '_instantiate_plugins' HOT 2
- How to use ohlc bar data ? if I want TA indicator in my strategy? HOT 1
- What was the main idea to synchronize exchange rate of fiat-currencies?
- Migrate database cannot import name escape_sequence
- ERROR:gryphon.execution.live_runner:[UnmappedInstanceError] Class '__builtin__.NoneType' is not mapped
- ImportError: cannot import name ESDIRK
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gryphon.