Working with Jupyter - how to ingest


#1

Hi there,

I am working through catalysts functionality, takes some time as the documentation could be better :thinking: and/or I am new to these development environment :wink:.

Tried to run a script under Jupyter, put it in a cell and run it, got the error “degree of freedom <= 0” that I already know, so ingesting did not work.

I did the following:

New notebook

Open a cell

%load_ext catalyst

and

%matploblib incline

%%catalyst …

script

The ingest command doesnot work from a cell, so I did this:

new terminal

ingest …

ingesting does work, but the script doesnot have access to it, same error.

I tried ingesting on a CLI (Ubuntu prompt, having activated catalyst), working fine, but the Jupyter script still gets the same error…

how do I ingest correctly?


#2

You have to ingest in the terminal before launching Jupyter. If someone knows a way to do it inside Jupyter, please advise.


#3

Thanks, thats working.

Documentation could be more clear :wink:

Where are the ingested data stored (Ubuntu)?


#4

You can run shell commands in jupyter

%%bash
catalyst ingest-exchange -x bitfinex -i btc_usd

#5

Doesn’t work for me.

I get “UsageError: %%bash is a cell magic, but the cell body is empty.”

i next tried
!catalyst ingest-exchange -x bitfinex -i btc_usd

but got

c:\users\user\documents\catalyst\catalyst-venv\lib\site-packages\IPython\utils_process_win32.py:131: ResourceWarning: unclosed file <_io.BufferedWriter name=6> return process_handler(cmd, _system_body) c:\users\user\documents\catalyst\catalyst-venv\lib\site-packages\IPython\utils_process_win32.py:131: ResourceWarning: unclosed file <_io.BufferedReader name=7> return process_handler(cmd, _system_body) c:\users\user\documents\catalyst\catalyst-venv\lib\site-packages\IPython\utils_process_win32.py:131: ResourceWarning: unclosed file <_io.BufferedReader name=8> return process_handler(cmd, _system_body)

Actually, despite the warnings it appears to have ingested the data when I used the exclamation point

so
!catalyst ingest-exchange -x bitfinex -i btc_usd
works for me but the %%bash thing doesnt

Is the %%bash thing for linux only?


#6

Write down “or paste” both lines first, THEN click run