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

Blaze master still using the old parser #21

Closed
mwiebe opened this issue Feb 14, 2013 · 3 comments
Closed

Blaze master still using the old parser #21

mwiebe opened this issue Feb 14, 2013 · 3 comments

Comments

@mwiebe
Copy link
Contributor

mwiebe commented Feb 14, 2013

One result is that datashapes still need commas on input, but print semicolons on output.

The problem seems to be from blaze/datashape/init.py, where it says

from parse import parse

I've tried changing it to

import parser

and have it call parser.parse instead, and this causes the dshape with the semicolon below to work, but causes many errors in the test suite.

In [1]: import blaze

In [2]: blaze.dshape('{x:int32,y:int32}')
Out[2]: dshape("{ x : int32; y : int32 }")

In [3]: blaze.dshape('{x:int32;y:int32}')
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
C:\Anaconda\lib\site-packages\IPython\core\interactiveshell.pyc in run_code(self, code_obj)
   2730             self.CustomTB(etype,value,tb)
   2731         except:
-> 2732             self.showtraceback()
   2733         else:
   2734             outflag = 0

C:\Anaconda\lib\site-packages\IPython\core\interactiveshell.pyc in showtraceback(self, exc_tuple, filename, tb_offset, exception_only)
   1718                                             value, tb, tb_offset=tb_offset)
   1719 
-> 1720                     self._showtraceback(etype, value, stb)
   1721                     if self.call_pdb:
   1722                         # drop into debugger

C:\Anaconda\lib\site-packages\IPython\zmq\zmqshell.pyc in _showtraceback(self, etype, evalue, stb)
    537             u'traceback' : stb,
    538             u'ename' : unicode(etype.__name__),
--> 539             u'evalue' : safe_unicode(evalue)
    540         }
    541 

C:\Anaconda\lib\site-packages\IPython\zmq\zmqshell.pyc in safe_unicode(e)
    443     """
    444     try:
--> 445         return unicode(e)
    446     except UnicodeError:
    447         pass

C:\Anaconda\lib\site-packages\blaze\error.pyc in __str__(self)
     54             filename = self.filename,
     55             lineno   = self.lineno,
---> 56             line     = self.text.split()[self.lineno],
     57             pointer  = ' '*self.col_offset + '^',
     58             msg      = self.msg,

TypeError: list indices must be integers, not str
@sdiehl
Copy link
Contributor

sdiehl commented Feb 14, 2013

Yes, I need to move this over. The old one should be removed.

@sdiehl
Copy link
Contributor

sdiehl commented Feb 15, 2013

Will be fixing this with the "remove_dep_parser" branch.

@sdiehl
Copy link
Contributor

sdiehl commented Feb 16, 2013

Fixed after e85d641

@sdiehl sdiehl closed this as completed Feb 16, 2013
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