Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue in notebook 03 and 05 #105

Open
jbm950 opened this issue Jul 8, 2016 · 2 comments
Open

Issue in notebook 03 and 05 #105

jbm950 opened this issue Jul 8, 2016 · 2 comments

Comments

@jbm950
Copy link
Contributor

jbm950 commented Jul 8, 2016

Im getting the following error in notebook 3 and 5

AttributeErrorTraceback (most recent call last)
/Users/james/anaconda/lib/python3.5/site-packages/IPython/core/formatters.py in __call__(self, obj)
    697                 type_pprinters=self.type_printers,
    698                 deferred_pprinters=self.deferred_printers)
--> 699             printer.pretty(obj)
    700             printer.flush()
    701             return stream.getvalue()

/Users/james/anaconda/lib/python3.5/site-packages/IPython/lib/pretty.py in pretty(self, obj)
    366                 if cls in self.type_pprinters:
    367                     # printer registered in self.type_pprinters
--> 368                     return self.type_pprinters[cls](obj, self, cycle)
    369                 else:
    370                     # deferred printer

/Users/james/git_repos/sympy_work/sympy/sympy/interactive/printing.py in _print_plain(arg, p, cycle)
     66         """caller for pretty, for use in IPython 0.11"""
     67         if _can_print_latex(arg):
---> 68             p.text(stringify_func(arg))
     69         else:
     70             p.text(IPython.lib.pretty.pretty(arg))

/Users/james/git_repos/sympy_work/sympy/sympy/physics/vector/printing.py in vpprint(expr, **settings)
    337 
    338     try:
--> 339         return pp.doprint(expr)
    340     finally:
    341         pretty_use_unicode(uflag)

/Users/james/git_repos/sympy_work/sympy/sympy/printing/pretty/pretty.py in doprint(self, expr)
     57 
     58     def doprint(self, expr):
---> 59         return self._print(expr).render(**self._settings)
     60 
     61     # empty op so _print(stringPict) returns the same

/Users/james/git_repos/sympy_work/sympy/sympy/physics/vector/vector.py in render(self, *args, **kwargs)
    288                                 pform = vp._print(
    289                                     ar[i][0][j])
--> 290                             pform = prettyForm(*pform.right(" ",
    291                                                 ar[i][1].pretty_vecs[j]))
    292                         else:

AttributeError: 'tuple' object has no attribute 'right'

My packages are as follows

$ pip list
abstract-rendering (0.5.1)
alabaster (0.7.7)
anaconda-client (1.2.2)
appnope (0.1.0)
appscript (1.0.1)
argcomplete (1.0.0)
astropy (1.1.1)
Babel (2.2.0)
backports.shutil-get-terminal-size (1.0.0)
beautifulsoup4 (4.4.1)
bitarray (0.8.1)
blaze (0.9.0)
bokeh (0.11.0)
boto (2.39.0)
Bottleneck (1.0.0)
cffi (1.2.1)
clyent (1.2.0)
colorama (0.3.6)
conda (4.0.8)
conda-build (1.19.0)
conda-env (2.4.5)
configobj (5.0.6)
cryptography (1.0.2)
cycler (0.9.0)
Cython (0.23.4)
cytoolz (0.7.5)
datashape (0.5.0)
decorator (4.0.10)
docutils (0.12)
dynd (f641248)
et-xmlfile (1.0.1)
fastcache (1.0.2)
Flask (0.10.1)
futures (3.0.3)
gnureadline (6.3.3)
greenlet (0.4.9)
h5py (2.5.0)
idna (2.0)
ipykernel (4.3.1)
ipython (4.2.0)
ipython-genutils (0.1.0)
ipywidgets (4.1.1)
itsdangerous (0.24)
jdcal (1.2)
jedi (0.9.0)
Jinja2 (2.8)
jsonschema (2.4.0)
jupyter (1.0.0)
jupyter-client (4.2.1)
jupyter-console (4.1.0)
jupyter-core (4.1.0)
llvmlite (0.8.0)
lxml (3.5.0)
MarkupSafe (0.23)
matplotlib (1.5.1)
mistune (0.7.1)
mpmath (0.19)
multipledispatch (0.4.8)
nbconvert (4.1.0)
nbformat (4.0.1)
networkx (1.11)
nltk (3.1)
nose (1.3.7)
notebook (4.2.1)
numba (0.23.1)
numexpr (2.4.6)
numpy (1.10.4)
odo (0.4.0)
openpyxl (2.3.2)
pandas (0.17.1)
path.py (0.0.0)
patsy (0.4.0)
pep8 (1.7.0)
pexpect (4.1.0)
pickleshare (0.7.2)
Pillow (3.1.0)
pip (8.1.2)
ply (3.8)
psutil (3.4.2)
ptyprocess (0.5.1)
py (1.4.31)
pyasn1 (0.1.9)
pycosat (0.6.1)
pycparser (2.14)
pycrypto (2.6.1)
pycurl (7.19.5.3)
pydy (0.4.0.dev0, /Users/james/git_repos/sympy_work/pydy)
pyflakes (1.0.0)
pyglet (1.2.4)
Pygments (2.1.1)
pyOpenSSL (0.15.1)
pyparsing (2.0.3)
pytest (2.8.5)
python-dateutil (2.4.2)
pytz (2015.7)
PyYAML (3.11)
pyzmq (15.2.0)
qtconsole (4.1.1)
redis (2.10.3)
requests (2.9.1)
rope-py3k (0.9.4.post1)
scikit-image (0.11.3)
scikit-learn (0.17)
scipy (0.17.0)
setuptools (23.0.0)
simplegeneric (0.8.1)
six (1.10.0)
snowballstemmer (1.2.1)
sockjs-tornado (1.0.1)
Sphinx (1.3.5)
sphinx-rtd-theme (0.1.9)
spyder (2.3.8)
SQLAlchemy (1.0.11)
statsmodels (0.6.1)
sympy (1.0, /Users/james/anaconda/lib/python3.5/site-packages)
tables (3.2.2)
terminado (0.5)
toolz (0.7.4)
tornado (4.3)
traitlets (4.2.1)
unicodecsv (0.14.1)
Werkzeug (0.11.3)
wheel (0.29.0)
widgetsnbextension (1.2.3)
xlrd (0.9.4)
XlsxWriter (0.8.4)
xlwings (0.6.4)
xlwt (1.0.0)```
@moorepants
Copy link
Member

moorepants commented Jul 11, 2016

I also got this error when trying to render a tuple of two dyadics in notebook 4:

selection_018

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/home/moorepants/miniconda3/lib/python3.5/site-packages/IPython/core/formatters.py in __call__(self, obj)
    697                 type_pprinters=self.type_printers,
    698                 deferred_pprinters=self.deferred_printers)
--> 699             printer.pretty(obj)
    700             printer.flush()
    701             return stream.getvalue()

/home/moorepants/miniconda3/lib/python3.5/site-packages/IPython/lib/pretty.py in pretty(self, obj)
    366                 if cls in self.type_pprinters:
    367                     # printer registered in self.type_pprinters
--> 368                     return self.type_pprinters[cls](obj, self, cycle)
    369                 else:
    370                     # deferred printer

/home/moorepants/miniconda3/lib/python3.5/site-packages/sympy/interactive/printing.py in _print_plain(arg, p, cycle)
     66         """caller for pretty, for use in IPython 0.11"""
     67         if _can_print_latex(arg):
---> 68             p.text(stringify_func(arg))
     69         else:
     70             p.text(IPython.lib.pretty.pretty(arg))

/home/moorepants/miniconda3/lib/python3.5/site-packages/sympy/physics/vector/printing.py in vpprint(expr, **settings)
    330 
    331     try:
--> 332         return pp.doprint(expr)
    333     finally:
    334         pretty_use_unicode(uflag)

/home/moorepants/miniconda3/lib/python3.5/site-packages/sympy/printing/pretty/pretty.py in doprint(self, expr)
     56 
     57     def doprint(self, expr):
---> 58         return self._print(expr).render(**self._settings)
     59 
     60     # empty op so _print(stringPict) returns the same

/home/moorepants/miniconda3/lib/python3.5/site-packages/sympy/printing/printer.py in _print(self, expr, *args, **kwargs)
    255                 printmethod = '_print_' + cls.__name__
    256                 if hasattr(self, printmethod):
--> 257                     return getattr(self, printmethod)(expr, *args, **kwargs)
    258 
    259             # Unknown object, fall back to the emptyPrinter.

/home/moorepants/miniconda3/lib/python3.5/site-packages/sympy/printing/pretty/pretty.py in _print_tuple(self, t)
   1670             return prettyForm(*ptuple.parens('(', ')', ifascii_nougly=True))
   1671         else:
-> 1672             return self._print_seq(t, '(', ')')
   1673 
   1674     def _print_Tuple(self, expr):

/home/moorepants/miniconda3/lib/python3.5/site-packages/sympy/printing/pretty/pretty.py in _print_seq(self, seq, left, right, delimiter, parenthesize)
   1638                 s = pform
   1639             else:
-> 1640                 s = prettyForm(*stringPict.next(s, delimiter))
   1641                 s = prettyForm(*stringPict.next(s, pform))
   1642 

/home/moorepants/miniconda3/lib/python3.5/site-packages/sympy/printing/pretty/stringpict.py in next(*args)
     70         newHeightBelowBaseline = max(
     71             obj.height() - obj.baseline
---> 72             for obj in objects)
     73         newHeight = newBaseline + newHeightBelowBaseline
     74 

/home/moorepants/miniconda3/lib/python3.5/site-packages/sympy/printing/pretty/stringpict.py in <genexpr>(.0)
     70         newHeightBelowBaseline = max(
     71             obj.height() - obj.baseline
---> 72             for obj in objects)
     73         newHeight = newBaseline + newHeightBelowBaseline
     74 

AttributeError: 'Fake' object has no attribute 'height'

@moorepants
Copy link
Member

@jbm950 I am not able to recreate the errors you are getting in notebooks 3 and 5. What line are you typing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants