question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AttributeError: 'NoneType' object has no attribute 'origin'

See original GitHub issue

📚 Installation

Traceback (most recent call last): File “/home/shelly/bourne/reimp_paper/MTAG-main/test/t1.py”, line 24, in <module> import torch_sparse File “/home/shelly/anaconda3/envs/pyt/lib/python3.6/site-packages/torch_sparse/init.py”, line 15, in <module> f’{library}_{suffix}', [osp.dirname(file)]).origin) AttributeError: ‘NoneType’ object has no attribute ‘origin’

Environment

Checklist

  • [1 ] I followed the installation guide.
  • [1 ] I cannot find my error message in the FAQ.
  • [1] I set up CUDA correctly and can compile CUDA code via nvcc.
  • [0 ] I do have multiple CUDA versions on my machine.

Additional context

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:29 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
rubenwiersmacommented, Apr 22, 2021

I had the same problem and error statement. The problem in my situation was because I had multiple versions of the CUDA toolkit installed. I fixed this by setting the directory in PATH to point directly to the cuda-11.1 folder:

$ export PATH=/usr/local/cuda-11.1/bin:$PATH

And the same for CPATH and LD_LIBRARY_PATH:

$ export CPATH=/usr/local/cuda-11.1/include:$CPATH
$ export LD_LIBRARY_PATH=/usr/local/cuda-11.1/lib64:$LD_LIBRARY_PATH

Then, uninstall torch-sparse, and install with the --no-cache-dir flag, so it doesn’t use the cached wheel.

2reactions
ZZy979commented, Apr 21, 2021

I solved the problem by replacing pip install torch-sparse -f https://pytorch-geometric.com/whl/torch-1.7.1+cu110.html with pip install torch-sparse -f https://pytorch-geometric.com/whl/torch-1.7.0+cu110.html (My PyTorch version is 1.7.1)

Read more comments on GitHub >

github_iconTop Results From Across the Web

AttributeError: 'NoneType' object has no attribute 'origin' #127
I am using torch-sparse version 0.6.8 as a dependency for a project I am working on. However, I get the following error inside...
Read more >
Django 3.2: AttributeError: 'NoneType' object has no attribute ...
The problem seems to be that the __init__ method from the django Model class never gets called. This is because an __init__ method...
Read more >
artifact: AttributeError: 'NoneType' object has no attribute 'origin'
+++ This bug was initially created as a clone of Bug #1311431 +++ I believe Bug 1296530 is causing bustage with artifact builds...
Read more >
Why do I get AttributeError: 'NoneType' object has no attribute ...
1 Answer. You are getting AttributeError: 'NoneType' object has no attribute 'something' because NoneType means that instead of an instance of whatever Class...
Read more >
'NoneType' object has no attribute 'origin' - Kaggle
hello, I'm trying to run this short program but an error showes up. this is the program: import numpy as np import cv2...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found