-
Notifications
You must be signed in to change notification settings - Fork 47
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
Trouble importing and accessing omnipath from pypath #275
Comments
I'm having a similar issue with any request to omnipath resources. Here is an example error thrown:
|
I also get a similar error when importing pypath installed with either: As a result, I am unable to use: |
I was also unable to load the database when installing through either pypi or github. I cloned the project, and installed pypath by navigating to the root folder and ran from pypath import omnipath
op = omnipath.db.get_db('omnipath') Note, some resources appear to be inaccessible, but that might be due to the other resources. I am attaching a log, it it is relevant to the developers. |
Same here, I landed here while working with
I had a leftover installation in a different location that was causing the issue, willov workaround works for me. |
Hello, any news about this issue? |
Hi All, Apologies for coming so late to this issue. I think a variety of independent issues pop up in this thread:
|
Thank you, @deeenes . I will give it a try and update. |
Hello @deeenes ! Thanks for all this great work. I installed omnipath ( 'ModuleNotFoundError: No module named toml) and pypath later, to load from there omnipath (again: 'ModuleNotFoundError: No module named toml'). Where could I find this missing module? Many thanks! |
Hi @corinabioinformatic, that's weird, both |
Hi @deeenes . I basically: ERROR |
@corinabioinformatic -- Indeed it's a question why
However, I would try to install them manually, bc this particular situation is likely rare, and probably for you the problem will be sorted out this way:
Apart from this, I wouldn't recommend calling Denes |
Hello when I run WARNING:root:pypath-omnipath is not installed. Please install it with: pip install git+https://github.com/saezlab/pypath.git
|
Hello @Ryeeeeeeeeee, see here, especially the last few comments |
Hello,
When I try importing pypath or omnipath after installing it, I keep getting AttributeError: 'NoneType' object has no attribute 'msg'. However, it works fine if I delete the the last line of init.py: info(0).
AttributeError Traceback (most recent call last)
Cell In[44], line 1
----> 1 from pypath import omnipath
File c:\Users\sundo\anaconda3\Lib\site-packages\pypath_init_.py:110
81 _session_mod.log().msg(
82 (
83 '\n'
(...)
106 wrap = False,
107 )
109 # include info at the beginning of the log:
--> 110 info(0)
File c:\Users\sundo\anaconda3\Lib\site-packages\pypath_init_.py:81, in info(loglevel)
76 def info(loglevel = -9):
77 """
78 Prints basic information about the current session.
79 """
---> 81 _session_mod.log().msg(
82 (
83 '\n'
84 '\t- session ID:
%s
\n'85 '\t- working directory:
%s
\n'...
105 level = loglevel,
106 wrap = False,
107 )
AttributeError: 'NoneType' object has no attribute 'msg'
In addition, further error arises when I try accessing omnipath database.
NameError Traceback (most recent call last)
Cell In[9], line 1
----> 1 cu = omnipath.db.get_db('curated')
2 cu.make_df()
3 cu.df
File c:\Users\sundo\anaconda3\Lib\site-packages\pypath\omnipath\app.py:492, in DatabaseManager.get_db(self, dataset, ncbi_tax_id)
482 def get_db(self, dataset, ncbi_tax_id = 9606):
483 """
484 Returns a dataset object. Loads and builds the dataset if necessary.
485
(...)
489 files.
490 """
--> 492 self.ensure_dataset(dataset, ncbi_tax_id = ncbi_tax_id)
494 _dataset = self._dataset_taxid(dataset, ncbi_tax_id = ncbi_tax_id)
496 return getattr(self, _dataset)
File c:\Users\sundo\anaconda3\Lib\site-packages\pypath\omnipath\app.py:136, in DatabaseManager.ensure_dataset(self, dataset, force_reload, force_rebuild, ncbi_tax_id)
128 if (
129 force_rebuild or
130 self.rebuild or
131 rebuild_dataset or
132 not self.pickle_exists(dataset, ncbi_tax_id = ncbi_tax_id)
...
--> 323 if isinstance(value, _const.LIST_LIKE) else
324 getattr(self.resource, attr) == value
325 )
NameError: name '_const' is not defined
OS: Windows
Python version: 3.11.5
Apologies if this is a simple problem,
Thank you for your help
The text was updated successfully, but these errors were encountered: