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

スシローParseエラー #7

Open
t3yamoto opened this issue Aug 22, 2020 · 1 comment
Open

スシローParseエラー #7

t3yamoto opened this issue Aug 22, 2020 · 1 comment

Comments

@t3yamoto
Copy link
Owner

No description provided.

@t3yamoto
Copy link
Owner Author

_______________________________________________________________________________________________ test_sushiro _______________________________________________________________________________________________

    def test_sushiro():
>       df = SushiroAllergyParser().parse()

tests/test_sushi_allergy_parser.py:76:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src/sushi_allergy_parser/sushiro.py:50: in parse
    df = self._parse_table(filename, TABLE_LAYOUT)
src/sushi_allergy_parser/sushiro.py:72: in _parse_table
    df_filterd = df.query('category != "分類"')
.venv/lib/python3.8/site-packages/pandas/core/frame.py:3184: in query
    res = self.eval(expr, **kwargs)
.venv/lib/python3.8/site-packages/pandas/core/frame.py:3300: in eval
    return _eval(expr, inplace=inplace, **kwargs)
.venv/lib/python3.8/site-packages/pandas/core/computation/eval.py:322: in eval
    parsed_expr = Expr(expr, engine=engine, parser=parser, env=env, truediv=truediv)
.venv/lib/python3.8/site-packages/pandas/core/computation/expr.py:827: in __init__
    self.terms = self.parse()
.venv/lib/python3.8/site-packages/pandas/core/computation/expr.py:844: in parse
    return self._visitor.visit(self.expr)
.venv/lib/python3.8/site-packages/pandas/core/computation/expr.py:441: in visit
    return visitor(node, **kwargs)
.venv/lib/python3.8/site-packages/pandas/core/computation/expr.py:447: in visit_Module
    return self.visit(expr, **kwargs)
.venv/lib/python3.8/site-packages/pandas/core/computation/expr.py:441: in visit
    return visitor(node, **kwargs)
.venv/lib/python3.8/site-packages/pandas/core/computation/expr.py:450: in visit_Expr
    return self.visit(node.value, **kwargs)
.venv/lib/python3.8/site-packages/pandas/core/computation/expr.py:441: in visit
    return visitor(node, **kwargs)
.venv/lib/python3.8/site-packages/pandas/core/computation/expr.py:744: in visit_Compare
    return self.visit(binop)
.venv/lib/python3.8/site-packages/pandas/core/computation/expr.py:441: in visit
    return visitor(node, **kwargs)
.venv/lib/python3.8/site-packages/pandas/core/computation/expr.py:563: in visit_BinOp
    op, op_class, left, right = self._maybe_transform_eq_ne(node)
.venv/lib/python3.8/site-packages/pandas/core/computation/expr.py:484: in _maybe_transform_eq_ne
    right = self.visit(node.right, side="right")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <pandas.core.computation.expr.PandasExprVisitor object at 0x10e18c850>, node = <_ast.Constant object at 0x10e18cc10>, kwargs = {'side': 'right'}, method = 'visit_Constant'
visitor = <bound method NodeVisitor.visit_Constant of <pandas.core.computation.expr.PandasExprVisitor object at 0x10e18c850>>

    def visit(self, node, **kwargs):
        if isinstance(node, str):
            clean = self.preparser(node)
            try:
                node = ast.fix_missing_locations(ast.parse(clean))
            except SyntaxError as e:
                from keyword import iskeyword

                if any(iskeyword(x) for x in clean.split()):
                    e.msg = "Python keyword not valid identifier" " in numexpr query"
                raise e

        method = "visit_" + node.__class__.__name__
        visitor = getattr(self, method)
>       return visitor(node, **kwargs)
E       TypeError: visit_Constant() got an unexpected keyword argument 'side'

.venv/lib/python3.8/site-packages/pandas/core/computation/expr.py:441: TypeError

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

1 participant