I was following simple py2neo tutorial here: http://nicolewhite.github.io/neo4j-jupyter/hello-world.html
Everything worked fine, all the entries appear in the neo4j in-browser version, however when I try to run inline Cypher queries, I get a 404 error.
%%cypher
http://neo4j:password#localhost:7474/db/data/
MATCH (person:Person)-[:LIKES]->(drink:Drink)
RETURN person.name, drink.name, drink.calories
Here's the traceback:
Format: (http|https)://username:password#hostname:port/db/name
---------------------------------------------------------------------------
NotFoundError Traceback (most recent call last)
<ipython-input-12-de2d5705ff61> in <module>
----> 1 get_ipython().run_cell_magic('cypher', '', 'http://neo4j:password#localhost:7474/db/data/\nMATCH (person:Person)-[:LIKES]->(drink:Drink)\nRETURN person.name, drink.name, drink.calories\n')
~/.local/lib/python3.6/site-packages/IPython/core/interactiveshell.py in run_cell_magic(self, magic_name, line, cell)
2369 with self.builtin_trap:
2370 args = (magic_arg_s, cell)
-> 2371 result = fn(*args, **kwargs)
2372 return result
2373
<decorator-gen-127> in execute(self, line, cell, local_ns)
~/.local/lib/python3.6/site-packages/IPython/core/magic.py in <lambda>(f, *a, **k)
185 # but it's overkill for just that one bit of state.
186 def magic_deco(arg):
--> 187 call = lambda f, *a, **k: f(*a, **k)
188
189 if callable(arg):
<decorator-gen-126> in execute(self, line, cell, local_ns)
~/.local/lib/python3.6/site-packages/IPython/core/magic.py in <lambda>(f, *a, **k)
185 # but it's overkill for just that one bit of state.
186 def magic_deco(arg):
--> 187 call = lambda f, *a, **k: f(*a, **k)
188
189 if callable(arg):
~/.local/lib/python3.6/site-packages/cypher/magic.py in execute(self, line, cell, local_ns)
106 user_ns.update(local_ns)
107 parsed = parse("""{0}\n{1}""".format(line, cell), self)
--> 108 conn = Connection.get(parsed['as'] or parsed['uri'], parsed['as'])
109 first_word = parsed['cypher'].split(None, 1)[:1]
110 if first_word and first_word[0].lower() == 'persist':
~/.local/lib/python3.6/site-packages/cypher/connection.py in get(cls, descriptor, alias)
45 cls.current = conn
46 else:
---> 47 cls.current = Connection(descriptor, alias)
48 if cls.current:
49 return cls.current
~/.local/lib/python3.6/site-packages/cypher/connection.py in __init__(self, connect_str, alias)
24 gdb = GraphDatabase(self.connections[connect_str])
25 else:
---> 26 gdb = GraphDatabase(connect_str)
27 alias = alias or connect_str
28 except:
~/.local/lib/python3.6/site-packages/neo4jrestclient/client.py in __init__(self, url, username, password, cert_file, key_file)
81 response_json = response.json()
82 else:
---> 83 raise NotFoundError(response.status_code, "Unable get root")
84 if "data" in response_json and "management" in response_json:
85 response = Request(**self._auth).get(response_json["data"])
NotFoundError: Code [404]: Not Found. Nothing matches the given URI.
Unable get root
I tried checking if the URI works according to this answer here, and I get 404 error there too:
~$ curl -i --user neo4j:password http://localhost:7474/db/data/
HTTP/1.1 404 Not Found
Access-Control-Allow-Origin: *
Cache-Control: must-revalidate,no-cache,no-store
Content-Type: text/html;charset=iso-8859-1
Content-Length: 0
I tried setting the Graph option to include the link, but it didn't help:
graph = Graph("http://neo4j:password#localhost:7474/db/data/")
Could you please tell me where have I made a mistake?
I am using py2neo most of the time. Here is how I connect to my local neo4j db.
from py2neo import Graph
graph = Graph("bolt://localhost:7687", auth=("neo4j", "xxxxx"))
try:
graph.run("Match () Return 1 Limit 1")
print('ok')
except Exception:
print('not ok')
Related
I'm running jupyter lab on windows and fastai.vision.utils.verify_images(fns) is giving me problems because it calls fastcore.parallel.parallel with default n_workers=8. There are many ways around it, but I was trying to figure out a code block that I could slap in any notebook and have it so all underlying calls to parallel will run with n_workers=1.
I tried the following cell:
import fastcore
import sys
_fastcore = fastcore
_parallel = lambda *args, **kwargs: fastcore.parallel.parallel(*args, **kwargs, n_workers=1)
_fastcore.parallel.parallel = _parallel
sys.modules['fastcore'] = _fastcore
fastcore.parallel.parallel
printing
<function __main__.<lambda>(*args, **kwargs)>
but when I try running verify_images it still fails as if the patch never happened
---------------------------------------------------------------------------
BrokenProcessPool Traceback (most recent call last)
<ipython-input-37-f1773f2c9e62> in <module>
3 # from mock import patch
4 # with patch('fastcore.parallel.parallel') as _parallel:
----> 5 failed = verify_images(fns)
6 # failed = L(fns[i] for i,o in enumerate(_parallel(verify_image, fns)) if not o)
7 failed
~\anaconda3\lib\site-packages\fastai\vision\utils.py in verify_images(fns)
59 def verify_images(fns):
60 "Find images in `fns` that can't be opened"
---> 61 return L(fns[i] for i,o in enumerate(parallel(verify_image, fns)) if not o)
62
63 # Cell
~\anaconda3\lib\site-packages\fastcore\parallel.py in parallel(f, items, n_workers, total, progress, pause, threadpool, timeout, chunksize, *args, **kwargs)
121 if total is None: total = len(items)
122 r = progress_bar(r, total=total, leave=False)
--> 123 return L(r)
124
125 # Cell
~\anaconda3\lib\site-packages\fastcore\foundation.py in __call__(cls, x, *args, **kwargs)
95 def __call__(cls, x=None, *args, **kwargs):
96 if not args and not kwargs and x is not None and isinstance(x,cls): return x
---> 97 return super().__call__(x, *args, **kwargs)
98
99 # Cell
~\anaconda3\lib\site-packages\fastcore\foundation.py in __init__(self, items, use_list, match, *rest)
103 def __init__(self, items=None, *rest, use_list=False, match=None):
104 if (use_list is not None) or not is_array(items):
--> 105 items = listify(items, *rest, use_list=use_list, match=match)
106 super().__init__(items)
107
~\anaconda3\lib\site-packages\fastcore\basics.py in listify(o, use_list, match, *rest)
54 elif isinstance(o, list): res = o
55 elif isinstance(o, str) or is_array(o): res = [o]
---> 56 elif is_iter(o): res = list(o)
57 else: res = [o]
58 if match is not None:
~\anaconda3\lib\concurrent\futures\process.py in _chain_from_iterable_of_lists(iterable)
482 careful not to keep references to yielded objects.
483 """
--> 484 for element in iterable:
485 element.reverse()
486 while element:
~\anaconda3\lib\concurrent\futures\_base.py in result_iterator()
609 # Careful not to keep a reference to the popped future
610 if timeout is None:
--> 611 yield fs.pop().result()
612 else:
613 yield fs.pop().result(end_time - time.monotonic())
~\anaconda3\lib\concurrent\futures\_base.py in result(self, timeout)
437 raise CancelledError()
438 elif self._state == FINISHED:
--> 439 return self.__get_result()
440 else:
441 raise TimeoutError()
~\anaconda3\lib\concurrent\futures\_base.py in __get_result(self)
386 def __get_result(self):
387 if self._exception:
--> 388 raise self._exception
389 else:
390 return self._result
BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.
I suspect it has to do with fastai.vision.utils using * imports for fastcore. Is there a way to achieve what I want?
Since the parallel function has already been imported into the fastai.vision.utils module, the correct way is to monkeypatch that module rather than fastcore.parallel:
... # your code for custom `parallel` function goes here
import fastai.vision.utils
fastai.vision.utils.parallel = _parallel # assign your custom function here
I'm using rpy2 library to use both R and python in the same notebook in jupyter lab. All is working properly (first I installed R essential and second rpy2 library).
To load library I use
%load_ext rpy2.ipython
Before each R code i use
%%R
To convert R object to python, i use
%R -o R_object
And to convert python object to R i use
%R -i python_object
My problem is the last code (to convert from python to R). I have the following mistake I don't understand
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
<ipython-input-90-cc234320b667> in <module>
----> 1 get_ipython().run_line_magic('R', '-i python_object')
~\anaconda3\lib\site-packages\IPython\core\interactiveshell.py in run_line_magic(self, magic_name, line, _stack_depth)
2315 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
2316 with self.builtin_trap:
-> 2317 result = fn(*args, **kwargs)
2318 return result
2319
<C:\Users\steph\anaconda3\lib\site-packages\decorator.py:decorator-gen-131> in R(self, line, cell, local_ns)
~\anaconda3\lib\site-packages\IPython\core\magic.py in <lambda>(f, *a, **k)
185 # but it's overkill for just that one bit of state.
186 def magic_deco(arg):
--> 187 call = lambda f, *a, **k: f(*a, **k)
188
189 if callable(arg):
~\anaconda3\lib\site-packages\rpy2\ipython\rmagic.py in R(self, line, cell, local_ns)
688 raise NameError("name '%s' is not defined" % input)
689 with localconverter(converter) as cv:
--> 690 ro.r.assign(input, val)
691
692 tmpd = self.setup_graphics(args)
~\anaconda3\lib\site-packages\rpy2\robjects\functions.py in __call__(self, *args, **kwargs)
176 v = kwargs.pop(k)
177 kwargs[r_k] = v
--> 178 return super(SignatureTranslatedFunction, self).__call__(*args, **kwargs)
179
180 pattern_link = re.compile(r'\\link\{(.+?)\}')
~\anaconda3\lib\site-packages\rpy2\robjects\functions.py in __call__(self, *args, **kwargs)
100
101 def __call__(self, *args, **kwargs):
--> 102 new_args = [conversion.py2ri(a) for a in args]
103 new_kwargs = {}
104 for k, v in kwargs.items():
~\anaconda3\lib\site-packages\rpy2\robjects\functions.py in <listcomp>(.0)
100
101 def __call__(self, *args, **kwargs):
--> 102 new_args = [conversion.py2ri(a) for a in args]
103 new_kwargs = {}
104 for k, v in kwargs.items():
~\anaconda3\lib\functools.py in wrapper(*args, **kw)
838 '1 positional argument')
839
--> 840 return dispatch(args[0].__class__)(*args, **kw)
841
842 funcname = getattr(func, '__name__', 'singledispatch function')
~\anaconda3\lib\site-packages\rpy2\robjects\numpy2ri.py in nonnumpy2ri(obj)
119 # For now, go with the default_converter.
120 # TODO: the conversion system needs an overhaul badly.
--> 121 return ro.default_converter.py2ri(obj)
122 else:
123 # The conversion module was "activated"
~\anaconda3\lib\functools.py in wrapper(*args, **kw)
838 '1 positional argument')
839
--> 840 return dispatch(args[0].__class__)(*args, **kw)
841
842 funcname = getattr(func, '__name__', 'singledispatch function')
~\anaconda3\lib\site-packages\rpy2\robjects\conversion.py in _py2ri(obj)
58 (ri) objects.
59 """
---> 60 raise NotImplementedError("Conversion 'py2ri' not defined for objects of type '%s'" % str(type(obj)))
61
62 def _py2ro(obj):
NotImplementedError: Conversion 'py2ri' not defined for objects of type '<class 'tuple'>'
Someone have an idea what does it mean?
Thanks you in advance
Stéphane
Actually I did some tests. Because this thing exist one of a largest benefit is that we can create or manipulate objects or data in one language and pass it to the other (to do more operations for example).
Apparently it depends how I create object in python (I'm new in python, I'm better in R).
But now both
%R -o R_object
and
%R -i python_object
work well. But i didn't check for several different object (matrix etc...). I think I need to use it more to better understand but basicaly it work :)
Have a nice day
Stéphane
%R/%%R is documented. Try:
%load_ext rpy2.ipython
?%%R
There is also a section in the rpy2 documentation dedicated to notebooks:
https://rpy2.github.io/doc/v3.4.x/html/generated_rst/notebooks.html
I'm trying to learn how to use the Azure Table Storage service. I'm following this tutorial: https://learn.microsoft.com/en-us/azure/storage/storage-python-how-to-use-table-storage and I am simply copy pasting the code into a jupyter notebook. I've setup a storage account and am successfully using the blob storage. Also from a notebook.
Code from the tutorial:
from azure.storage.table import TableService, Entity
table_service = TableService(account_name='myaccount', account_key='mykey')
table_service.create_table('tasktable')
When I run the last line I get the following error and I'm not sure what I am doing wrong to cause it
---------------------------------------------------------------------------
Error Traceback (most recent call last)
/usr/local/lib/python3.5/site-packages/azure/storage/storageclient.py in _perform_request(self, request, parser, parser_args, operation_context)
205 _add_date_header(request)
--> 206 self.authentication.sign_request(request)
207
/usr/local/lib/python3.5/site-packages/azure/storage/_auth.py in sign_request(self, request)
96
---> 97 self._add_authorization_header(request, string_to_sign)
98
/usr/local/lib/python3.5/site-packages/azure/storage/_auth.py in _add_authorization_header(self, request, string_to_sign)
50 def _add_authorization_header(self, request, string_to_sign):
---> 51 signature = _sign_string(self.account_key, string_to_sign)
52 auth_string = 'SharedKey ' + self.account_name + ':' + signature
/usr/local/lib/python3.5/site-packages/azure/storage/_common_conversion.py in _sign_string(key, string_to_sign, key_is_base64)
87 if key_is_base64:
---> 88 key = _decode_base64_to_bytes(key)
89 else:
/usr/local/lib/python3.5/site-packages/azure/storage/_common_conversion.py in _decode_base64_to_bytes(data)
77 data = data.encode('utf-8')
---> 78 return base64.b64decode(data)
79
/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/base64.py in b64decode(s, altchars, validate)
89 raise binascii.Error('Non-base64 digit found')
---> 90 return binascii.a2b_base64(s)
91
Error: Incorrect padding
During handling of the above exception, another exception occurred:
AzureException Traceback (most recent call last)
<ipython-input-17-192b23ba629f> in <module>()
----> 1 table_service.create_table('tasktable')
/usr/local/lib/python3.5/site-packages/azure/storage/table/tableservice.py in create_table(self, table_name, fail_on_exist, timeout)
520 if not fail_on_exist:
521 try:
--> 522 self._perform_request(request)
523 return True
524 except AzureHttpError as ex:
/usr/local/lib/python3.5/site-packages/azure/storage/table/tableservice.py in _perform_request(self, request, parser, parser_args, operation_context)
1087 def _perform_request(self, request, parser=None, parser_args=None, operation_context=None):
1088 _update_storage_table_header(request)
-> 1089 return super(TableService, self)._perform_request(request, parser, parser_args, operation_context)
/usr/local/lib/python3.5/site-packages/azure/storage/storageclient.py in _perform_request(self, request, parser, parser_args, operation_context)
264 sleep(retry_interval)
265 else:
--> 266 raise ex
267 finally:
268 # If this is a location locked operation and the location is not set,
/usr/local/lib/python3.5/site-packages/azure/storage/storageclient.py in _perform_request(self, request, parser, parser_args, operation_context)
240 if sys.version_info >= (3,):
241 # Automatic chaining in Python 3 means we keep the trace
--> 242 raise AzureException(ex.args[0])
243 else:
244 # There isn't a good solution in 2 for keeping the stack trace
AzureException: Incorrect padding
As a summary, the issue was caused by the variable name for account key within some mistake. Accroding to the error information Error: Incorrect padding, as #Scovetta said, it seems to be not BASE64 encoding. Some changes for the key like missing the last = symbol or adding more = symbol will cause the error. And the length of correct account key of Azure Storage is 88.
Shameless necro after putting "incorrect padding azure" in my favorite search engine.
Turns out I was passing arguments like so : --account-key "$ACCOUNT_KEY", and Azure didn't understand the quotes.
Since it's supposed to be base64 encoded, all characters in there should be shell-safe, so if your input is OK there shouldn't be any problem putting it like that.
I've installed SQLAlchemy, ipython-sql, and IBM_DB support for SQLAlchemy. Link for the last one is one found on SQLAlchemy site and it's https://code.google.com/p/ibm-db/wiki/README.
I'm using python3 as my kernel in ipython and of course I used easy_install3
%load_ext sql
%sql ibm_db_sa://bpadmin:bpadmin#192.168.2.128/studAdmin
And I got the following error:
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-2-ca75a37d0cce> in <module>()
----> 1 get_ipython().magic('sql ibm_db_sa://bpadmin:bpadmin#192.168.2.128/studAdmin')
/usr/lib/python3/dist-packages/IPython/core/interactiveshell.py in magic(self, arg_s)
2164 magic_name, _, magic_arg_s = arg_s.partition(' ')
2165 magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
-> 2166 return self.run_line_magic(magic_name, magic_arg_s)
2167
2168 #-------------------------------------------------------------------------
/usr/lib/python3/dist-packages/IPython/core/interactiveshell.py in run_line_magic(self, magic_name, line)
2085 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
2086 with self.builtin_trap:
-> 2087 result = fn(*args,**kwargs)
2088 return result
2089
/usr/local/lib/python3.4/dist-packages/sql/magic.py in execute(self, line, cell, local_ns)
/usr/lib/python3/dist-packages/IPython/core/magic.py in <lambda>(f, *a, **k)
190 # but it's overkill for just that one bit of state.
191 def magic_deco(arg):
--> 192 call = lambda f, *a, **k: f(*a, **k)
193
194 if isinstance(arg, collections.Callable):
/usr/local/lib/python3.4/dist-packages/sql/magic.py in execute(self, line, cell, local_ns)
/usr/lib/python3/dist-packages/IPython/core/magic.py in <lambda>(f, *a, **k)
190 # but it's overkill for just that one bit of state.
191 def magic_deco(arg):
--> 192 call = lambda f, *a, **k: f(*a, **k)
193
194 if isinstance(arg, collections.Callable):
/usr/local/lib/python3.4/dist-packages/sql/magic.py in execute(self, line, cell, local_ns)
73
74 parsed = sql.parse.parse('%s\n%s' % (line, cell), self)
---> 75 conn = sql.connection.Connection.get(parsed['connection'])
76 first_word = parsed['sql'].split(None, 1)[:1]
77 if first_word and first_word[0].lower() == 'persist':
/usr/local/lib/python3.4/dist-packages/sql/connection.py in get(cls, descriptor)
30 cls.current = conn
31 else:
---> 32 cls.current = Connection(descriptor)
33 if cls.current:
34 return cls.current
/usr/local/lib/python3.4/dist-packages/sql/connection.py in __init__(self, connect_str)
10 def __init__(self, connect_str=None):
11 try:
---> 12 engine = sqlalchemy.create_engine(connect_str)
13 except: # TODO: bare except; but what's an ArgumentError?
14 print(self.tell_format())
/usr/local/lib/python3.4/dist-packages/sqlalchemy/engine/__init__.py in create_engine(*args, **kwargs)
384 strategy = kwargs.pop('strategy', default_strategy)
385 strategy = strategies.strategies[strategy]
--> 386 return strategy.create(*args, **kwargs)
387
388
/usr/local/lib/python3.4/dist-packages/sqlalchemy/engine/strategies.py in create(self, name_or_url, **kwargs)
49 u = url.make_url(name_or_url)
50
---> 51 dialect_cls = u.get_dialect()
52
53 if kwargs.pop('_coerce_config', False):
/usr/local/lib/python3.4/dist-packages/sqlalchemy/engine/url.py in get_dialect(self)
127 else:
128 name = self.drivername.replace('+', '.')
--> 129 cls = registry.load(name)
130 # check for legacy dialects that
131 # would return a module with 'dialect' as the
/usr/local/lib/python3.4/dist-packages/sqlalchemy/util/langhelpers.py in load(self, name)
188 self.group, name):
189 self.impls[name] = impl.load
--> 190 return impl.load()
191
192 raise exc.NoSuchModuleError(
/usr/lib/python3/dist-packages/pkg_resources.py in load(self, require, env, installer)
2086 def load(self, require=True, env=None, installer=None):
2087 if require: self.require(env, installer)
-> 2088 entry = __import__(self.module_name, globals(),globals(), ['__name__'])
2089 for attr in self.attrs:
2090 try:
/usr/local/lib/python3.4/dist-packages/ibm_db_sa-0.3.2-py3.4.egg/ibm_db_sa/__init__.py in <module>()
20 __version__ = '0.3.2'
21
---> 22 from . import ibm_db, pyodbc, base, zxjdbc
23
24
/usr/local/lib/python3.4/dist-packages/ibm_db_sa-0.3.2-py3.4.egg/ibm_db_sa/ibm_db.py in <module>()
18 # +--------------------------------------------------------------------------+
19
---> 20 from .base import DB2ExecutionContext, DB2Dialect
21 from sqlalchemy import processors, types as sa_types, util
22 from sqlalchemy import __version__ as SA_Version
/usr/local/lib/python3.4/dist-packages/ibm_db_sa-0.3.2-py3.4.egg/ibm_db_sa/base.py in <module>()
34 VARCHAR, FLOAT
35
---> 36 SA_Version = [long(ver_token) for ver_token in SA_Version.split('.')[0:2]]
37
38 # as documented from:
/usr/local/lib/python3.4/dist-packages/ibm_db_sa-0.3.2-py3.4.egg/ibm_db_sa/base.py in <listcomp>(.0)
34 VARCHAR, FLOAT
35
---> 36 SA_Version = [long(ver_token) for ver_token in SA_Version.split('.')[0:2]]
37
38 # as documented from:
NameError: name 'long' is not defined
Format: (postgresql|mysql)://username:password#hostname/dbname, or one of dict_keys([])
I installed Canopy on my ubuntu 12.04 lts OS.
I am mainly using this for data analysis. I realised that the ? operator is not working.
For example. When I declare a integer b = 0 in the terminal and type b? it comes up with the following:
---------------------------------------------------------------------------
error Traceback (most recent call last)
<ipython-input-4-f4e05a8c28c4> in <module>()
----> 1 get_ipython().magic(u'pinfo d')
/home/marco/Enthought/Canopy_32bit/User/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in magic(self, arg_s)
2134 magic_name, _, magic_arg_s = arg_s.partition(' ')
2135 magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
-> 2136 return self.run_line_magic(magic_name, magic_arg_s)
2137
2138 #-------------------------------------------------------------------------
/home/marco/Enthought/Canopy_32bit/User/lib/python2.7/site-packages/IPython /core/interactiveshell.pyc in run_line_magic(self, magic_name, line)
2060 args.append(sys._getframe(stack_depth).f_locals)
2061 with self.builtin_trap:
-> 2062 result = fn(*args)
2063 return result
2064
/home/marco/Enthought/Canopy_32bit/User/lib/python2.7/site-packages/IPython/core/magics/namespace.pyc in pinfo(self, parameter_s, namespaces)
/home/marco/Enthought/Canopy_32bit/User/lib/python2.7/site-packages/IPython/core/magic.pyc in <lambda>(f, *a, **k)
189 # but it's overkill for just that one bit of state.
190 def magic_deco(arg):
--> 191 call = lambda f, *a, **k: f(*a, **k)
192
193 if callable(arg):
/home/marco/Enthought/Canopy_32bit/User/lib/python2.7/site-packages/IPython/core/magics/namespace.pyc in pinfo(self, parameter_s, namespaces)
56 else:
57 self.shell._inspect('pinfo', oname, detail_level=detail_level,
---> 58 namespaces=namespaces)
59
60 #line_magic
/home/marco/Enthought/Canopy_32bit/User/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in _inspect(self, meth, oname, namespaces, **kw)
1464 pmethod(info.obj, oname, formatter)
1465 elif meth == 'pinfo':
-> 1466 pmethod(info.obj, oname, formatter, info, **kw)
1467 else:
1468 pmethod(info.obj, oname)
/home/marco/Enthought/Canopy_32bit/User/lib/python2.7/site-packages/IPython/core/oinspect.pyc in pinfo(self, obj, oname, formatter, info, detail_level)
557 # Finally send to printer/pager:
558 if displayfields:
--> 559 page.page(self._format_fields(displayfields))
560
561 def info(self, obj, oname='', formatter=None, info=None, detail_level=0):
/home/marco/Enthought/Canopy_32bit/User/lib/python2.7/site-packages/IPython/core/page.pyc in page(strng, start, screen_lines, pager_cmd)
182 if screen_lines <= 0:
183 try:
--> 184 screen_lines += _detect_screen_size(use_curses, screen_lines_def)
185 except (TypeError, UnsupportedOperation):
186 print >>io.stdout, str_toprint
/home/marco/Enthought/Canopy_32bit/User/lib/python2.7/site-packages/IPython/core/page.pyc in _detect_screen_size(use_curses, screen_lines_def)
108
109 # Proceed with curses initialization
--> 110 scr = curses.initscr()
111 screen_lines_real,screen_cols = scr.getmaxyx()
112 curses.endwin()
/home/marco/Canopy/appdata/canopy-1.1.0.1371.rh5-x86/lib/python2.7/curses/__init__.pyc in initscr()
31 # instead of calling exit() in error cases.
32 setupterm(term=_os.environ.get("TERM", "unknown"),
---> 33 fd=_sys.__stdout__.fileno())
34 stdscr = _curses.initscr()
35 for key, value in _curses.__dict__.items():
error: setupterm: could not find terminfo database