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
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ipynb/fs/defs/init.py in _get_filtered_ast(self, source)
47 """
48 tree = ast.parse(source)
---> 49 tree.body = [n for n in tree.body if self._filter_ast_node(n)]
50 return tree
51
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ipynb/fs/defs/init.py in (.0)
47 """
48 tree = ast.parse(source)
---> 49 tree.body = [n for n in tree.body if self._filter_ast_node(n)]
50 return tree
51
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ipynb/fs/defs/init.py in _filter_ast_node(self, node)
38
39 if isinstance(node, ast.Assign):
---> 40 return all([t.id.isupper() for t in node.targets])
41
42 return False
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ipynb/fs/defs/init.py in (.0)
38
39 if isinstance(node, ast.Assign):
---> 40 return all([t.id.isupper() for t in node.targets])
41
42 return False
AttributeError: 'Tuple' object has no attribute 'id'
The text was updated successfully, but these errors were encountered:
* Moves tests into the source.
* Add lazy loading to address ipython#31
* Add a lazy import test
* Remove the dataclasses dependency and test on 3.4 and 3.5
* Remove the black dependency
* You hasty son of a gun
* Dump the docs deploy to pass 3.6
* Escape lazy loading in python 3.4
* Filefinder compat
* mkdir compat
* pathlib compat in the tests
* Add pypi version to deployments to travis
week1.ipynb.txt
Note sure how to debug the following error. Attached is the notebook I tried to import. They are in the same directory
Any ideas?
Thanks
Andy
#from ipynb.fs.defs.week1 import patternToNumber
import ipynb.fs.defs.week1 as wk1
#import ipynb.fs.defs.week1 as week1
import ipynb.fs from .defs.week2 \
import foo from .defs.week1 \
import patternToNumber
import ipynb.fs
from ../week2/week2 import patternToNumber from .defs.week1
# base 4 to base 10
# TODO copied from week1 notebook
def patternToNumber(pattern) :
exponent = 0
ret = 0
for nucleotide in reversed(pattern):
digit = 0
if nucleotide == "C" :
digit = 1
elif nucleotide == "G" :
digit = 2
elif nucleotide == "T" :
digit = 3
ret = ret + digit * 4**exponent
#print("ret:{0}, digit:{1}, exponent:{2} nucleotide:{3}"
# .format(ret, digit, exponent, nucleotide))
exponent = exponent + 1
return ret
AttributeError Traceback (most recent call last)
in ()
----> 1 from ipynb.fs.defs.week1 import patternToNumber
2 #import ipynb.fs.defs.week1 as wk1
3
4 #import ipynb.fs.defs.week1 as week1
5 # import ipynb.fs from .defs.week2 \
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/_bootstrap.py in find_and_load(name, import)
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/_bootstrap.py in find_and_load_unlocked(name, import)
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/_bootstrap.py in _load_unlocked(spec)
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/_bootstrap_external.py in exec_module(self, module)
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ipynb/fs/defs/init.py in get_code(self, fullname)
60 ))
61 return self.source_to_code(
---> 62 self._get_filtered_ast(code_from_ipynb(nb)),
63 self.path
64 )
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ipynb/fs/defs/init.py in _get_filtered_ast(self, source)
47 """
48 tree = ast.parse(source)
---> 49 tree.body = [n for n in tree.body if self._filter_ast_node(n)]
50 return tree
51
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ipynb/fs/defs/init.py in (.0)
47 """
48 tree = ast.parse(source)
---> 49 tree.body = [n for n in tree.body if self._filter_ast_node(n)]
50 return tree
51
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ipynb/fs/defs/init.py in _filter_ast_node(self, node)
38
39 if isinstance(node, ast.Assign):
---> 40 return all([t.id.isupper() for t in node.targets])
41
42 return False
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ipynb/fs/defs/init.py in (.0)
38
39 if isinstance(node, ast.Assign):
---> 40 return all([t.id.isupper() for t in node.targets])
41
42 return False
AttributeError: 'Tuple' object has no attribute 'id'
The text was updated successfully, but these errors were encountered: