You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/Users/edouglas/anaconda/envs/astroconda/lib/python3.6/site-packages/hope/_transformer.py in visit_Call(self, node)
577 elif isinstance(node.func, ast.Attribute):
--> 578 if not node.starargs is None or not node.kwargs is None:
579 raise UnsupportedFeatureException("Only arguments without default values are supported in calls")
AttributeError: 'Call' object has no attribute 'starargs'
During handling of the above exception, another exception occurred:
AttributeError Traceback (most recent call last)
/Users/edouglas/anaconda/envs/astroconda/lib/python3.6/site-packages/hope/_transformer.py in body_visit(self, stmts)
641 try:
--> 642 self.exprs.append(self.visit(stmt))
643 except Exception as ex:
/Users/edouglas/anaconda/envs/astroconda/lib/python3.6/site-packages/hope/_tosource.py in visit_Call(self, node)
440 self.visit(keyword.value)
--> 441 if node.starargs is not None:
442 write_comma()
AttributeError: 'Call' object has no attribute 'starargs'
During handling of the above exception, another exception occurred:
/Users/edouglas/anaconda/envs/astroconda/lib/python3.6/site-packages/hope/_wrapper.py in _hope_callback(*args)
69
70 def _hope_callback(*args):
---> 71 return self(*args) if self.cache is None else self.cache(*args)
72 self.callback = _hope_callback
73 setattr(cache, str(id(self.callback)), fkt)
/Users/edouglas/anaconda/envs/astroconda/lib/python3.6/site-packages/hope/_wrapper.py in call(self, *args)
75
76 def call(self, *args):
---> 77 ASTTransformer(self.modtoken).module_visit(self.fkt, args)
78
79 if config.optimize:
/Users/edouglas/anaconda/envs/astroconda/lib/python3.6/site-packages/hope/_transformer.py in module_visit(self, fkt, args, argid)
690 if argid is None or not argid in self.modtoken.functions[fkt.name]:
691 #Create the HOPE AST from the builtin AST
--> 692 parsed = self.visit(fktast)
693 if not parsed.getId() in [arg.getId() for arg in self.modtoken.functions[fkt.name]]:
694 self.modtoken.functions[fkt.name].append(parsed)
/Users/edouglas/anaconda/envs/astroconda/lib/python3.6/site-packages/hope/_transformer.py in visit_FunctionDef(self, node)
627
628 # TODO: how do we parse recursive subfuncitons?
--> 629 self.token.body = self.body_visit(node.body)
630 AllocateVisitor(self.variables).visit(self.token.body)
631 merged = {}
/Users/edouglas/anaconda/envs/astroconda/lib/python3.6/site-packages/hope/_transformer.py in body_visit(self, stmts)
644 if "\nin body " not in (ex.args[0] if ex.args else ""):
645 from hope._tosource import tosource
--> 646 ex.args = ((ex.args[0] if ex.args else "") + "\nin body " + tosource(stmt),) + ex.args[1:]
647 raise
648 for expr in self.exprs:
/Users/edouglas/anaconda/envs/astroconda/lib/python3.6/site-packages/hope/_wrapper.py in _compile(target, localfilename, fkt_name)
271 try:
272 #trying to encode utf-8 to support AstroPy
--> 273 warnings.warn("A warning has been issued during compilation:\n{0}".format(out).encode('utf-8'))
274 except UnicodeError:
275 #encoding fails on Linux
TypeError: cannot use a string pattern on a bytes-like object
The text was updated successfully, but these errors were encountered:
Hope doesn't support python3.6 and is no longer officially supported. However, there is an incomplete PR that attempts to support the lastest python release: #56
The following code works in Python 2.7 on in macOS 10.13:
but in Python 3.6.1 it returns the following error:
Readme example:
Additionally, the standard sum example from the readme gives this error in 3.6.1 but works in 2.7:
The text was updated successfully, but these errors were encountered: