Comments (7)
So after messing around w/ this a bunch, I settled with a work-around using conda environments, while not a fix, I thought I would post here in case anyone saw this:
I already had Miniconda3 installed on my windows based system (my preferred python distribution).
From the command prompt (not powershell):
>conda create -n EDDN python=2.7
>conda install pyzmq simplejson zlib gevent -n EDDN
>activate EDDN
>python client.py
when done with EDDN and wanting to go back to python 3
>deactivate
from eddn.
gEvent is effectively not used in examples, thus it could be removed.
I'll try when I have 5 minutes.
from eddn.
Try just changing:
import zmq.green as zmq
to:
import zmq
from eddn.
This is the closest I got, but I'm still getting:
TypeError: the JSON object must be str, not 'bytes'
import zlib
import zmq
import json
import sys
def main():
context = zmq.Context()
subscriber = context.socket(zmq.SUB)
subscriber.setsockopt_string(zmq.SUBSCRIBE, "")
subscriber.connect('tcp://eddn-relay.elite-markets.net:9500')
while True:
market_json = zlib.decompress(subscriber.recv())
market_data = json.loads(market_json)
print(market_data)
sys.stdout.flush()
if __name__ == '__main__':
main()
I've tried
import codecs
reader = codecs.getreader('utf-8')
...
market_data = json.load(reader(market_json))
....
Then I get:
TypeError: the JSON object must be str, not 'StreamReader'
from eddn.
Try that one: https://github.com/AnthorNet/EDDN/tree/EDDN-Monitor/examples/Python%203.4
from eddn.
I confirmed both of those worked (after I opened the issue yesterday, I found those files posted in the forums); I didn't want to make a pull request suggesting that they be added as I didn't write them (what's the protocol for that sort of thing, I'm still new to development/open source/etc)?
Probably should have mentioned that earlier on...
from eddn.
Closing, example is available in "master"
from eddn.
Related Issues (20)
- Ensure we can cope with feasible incoming `/upload/` rates HOT 4
- `ApproachSettlement` may refer to entities without MarketID HOT 6
- ApproachSettlement: Horizons bug might cause no Latitude/Longitude HOT 1
- Schema: fssbodysignals/1 HOT 5
- Augmentations: Document necessary cross-checks
- POST support interfering with `fsssignaldiscovered/1` schema HOT 2
- schemas: Add for `FCMaterials` data HOT 14
- Status page could perhaps use a link to the github
- All schemas: Consider making `horizons` and `odyssey` flags mandatory
- All schemas: New `gameversion` *header* field HOT 9
- schemas: Review all to ensure *schema* defines things as correctly as possible.
- Schemas/gameversion: Document denoting Live versus Legacy for CAPI data HOT 10
- Relay: Add logging of when a duplicate is dropped
- fcmaterials_journal-v1.0.json is missing items property from array HOT 1
- monitor: Add stats/table for gameversion
- shipyard-v2.0.json missing event field in message object HOT 1
- Request - Add event CommunityGoal
- Gateway: Log a message->message hash, and put it in message->header
- Investigate verifying EDDN Senders HOT 3
- ScanOrganic Schema HOT 5
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 eddn.