AttributeError: 'NoneType' object has no attribute 'path'
See original GitHub issueI might be invoking incorrectly etc, but at least it must crash more informatively
(git-annex)hopa:~/.tmp/datalad_temp_tree_test_within_ds_file_searchn0QiIy[master]git
$> python -c 'import bids as b; print(b.__version__); print(b.BIDSLayout(".").get_metadata("./participants.tsv"));'
0.7.1+1.g13c857f
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/yoh/proj/bids/pybids/bids/layout/layout.py", line 482, in get_metadata
self.metadata_index.index_file(path)
File "/home/yoh/proj/bids/pybids/bids/layout/layout.py", line 677, in index_file
if f.path in self.file_index and not overwrite:
AttributeError: 'NoneType' object has no attribute 'path'
$> tree
.
├── dataset_description.json -> .git/annex/objects/7W/Jm/MD5E-s328--28119d1fde6310f8119eda16bb00aead.json/MD5E-s328--28119d1fde6310f8119eda16bb00aead.json
├── derivatives
│ └── empty
├── participants.tsv -> .git/annex/objects/k4/gM/MD5E-s134--7f970918cea1615f0f3c9500907935a8.tsv/MD5E-s134--7f970918cea1615f0f3c9500907935a8.tsv
├── stim
├── sub-01
│ └── func
│ └── sub-01_task-some_bold.nii.gz -> ../../.git/annex/objects/W4/ZZ/MD5E-s15920--acfb708aa74951cfff1a9d466f6d77be.nii.gz/MD5E-s15920--acfb708aa74951cfff1a9d466f6d77be.nii.gz
└── sub-03
└── func
└── sub-03_task-other_bold.nii.gz -> ../../.git/annex/objects/W4/ZZ/MD5E-s15920--acfb708aa74951cfff1a9d466f6d77be.nii.gz/MD5E-s15920--acfb708aa74951cfff1a9d466f6d77be.nii.gz
7 directories, 4 files
Issue Analytics
- State:
- Created 5 years ago
- Comments:10
Top Results From Across the Web
Exception AttributeError: "'NoneType' object has no attribute ...
This tells that in function _remove an attribute path was tried to be accessed on a NoneType object. NoneType objects have no attributes....
Read more >'NoneType' object has no attribute '_inc_path' - Google Groups
Basically I am getting this error. AttributeError at /admin/pages/new/wagtail_articles/articleindex/3/ 'NoneType' object has no attribute '_inc_path'
Read more >AttributeError: 'NoneType' object has no attribute 'mkdir'
Cells 1 and 2 execute w/o error. But when I try to run cell 3, which is: path = untar_data(URLs.MNIST_SAMPLE). I get this...
Read more >Attributeerror: 'nonetype' object has no attribute 'shape'
The first way to solve the error is to first check the value of the variable if it is 'None'. The second way...
Read more >AttributeError: 'NoneType' object has no attribute 'get_path_url ...
Trac detected an internal error: AttributeError: 'NoneType' object has no attribute ... return tag.a(_('Subversion'), href=repos.get_path_url(path, None)).
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
why? just expand them right away using the parent’s path. So for derivatives it would be
derivatives/<name>
. if derivative is not underderivatives/
then I guess full path would be needed. This way at least it shouldn’t be worse than current situation.Actually, hold that thought. There’s still a problem when initializing a layout with
path='.'
; will push a fix shortly.