-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
Module not found #43
Comments
Hi @barseghyanartur, Sorry you ran into this issue! How do you import is it |
…o as it is not possible to have in a module name.
From the error, portray incorrectly guesses your module is named "graphene-elastic" which can't be the case, as valid Python module names cannot contain dashes. This should be fixed automatically for you in the just release 1.3.1 release: https://timothycrosley.github.io/portray/CHANGELOG/#131-september-22-2019. To work around this in 1.3.0, simply do Hope this helps! Thanks! ~Timothy |
Thanks for your quick reaction and efforts! Unfortunately that didn't fix my issue. I still do get the same error after upgrading to 1.3.1. Work around using When I build docs using sphinx, I do add extra paths (in the Please, let me know if you need more input or perhaps help from my side. Thanks! |
The other common issue is that portray is installed in a different env (such as a global installation) from the project itself. Can you do a Thanks! ~Timothy |
I got it working in my fork. The only change I made was this. I used to get Inside of my packages=find_packages(
where="./src",
exclude=["tests"]
), That's where it fails. Please, tell me if you want a PR. What does not yet work fine for me yet: I would expect I'm a big fan of Why not automatically convert all |
Glad you were able to get to the bottom of of it! I'm a little surprised that would make a difference, as that block is already wrapped in a try except block: https://github.com/timothycrosley/portray/blob/master/portray/config.py#L105. However, what it would do is suppress the warning - however everything should work fine with the warning in place (which can also be silenced by explicitly setting the module list). I am very open to the idea of preconverting Thanks! ~Timothy |
I think the reason it fails is that it might go wrong for one of the items in the list, but not for all. Say, there are multiple packages (and sub-packages) identified by In any case, I think you have a good point that warning shall be shown in any case, thus, I'll add it in the second As for preconverting the .rst to .md, I'll try to find time for it this week. That would be the second PR. Thanks so far! |
@barseghyanartur Merge requests are always welcomed :)! Really appreciate the willingness to do so! Thanks! ~Timothy |
@timothycrosley first thanks for this project is really amazing. I'm using portray If I remove this file portray work's smoothly, but it's not the case. This bug has any relation to this issue? Or it's better open a new one? Is there anything that I could do to to fix this or get some more information? This happen here. |
I'm interested in using portray to generate docs for our
I am guessing the |
@timothycrosley, Investigating this problem a little more seemed to me that problem occurs on the pdocs, extract.py module. In my case I was able to correct the error by setting PYTHONPATH environment variable to the current directory. For example: I'm looking for a better understanding of the issue and, if relevant, submit a pull request. |
I'm running into this too. From what I'm seeing, it seems like this is due to using The docstring of
which means it's not valid to pass it a function call like that. Since a function call expression also depends on things in the current scope (specifically I'm curious if it would make more sense to instead simply mock the |
Same problem here. Unsure if relevant, but it was working a minute ago on Linux w/ Python 3.8; I'm now on macOS w/ Python 3.6. |
Just ran into this same error. Someone added a new module to an existing project at Given the other debugging comments people have made in this thread make me worry that the PYTHONPATH setting isn't a real fix. In fact, I would guess that this would break in my project if I ever had two modules with the same name in different packages (e.g. Edit: I'm going to try changing all of my CI scripts to something like:
Which works if your version of |
Hello Timothy.
I'm getting the following error when running
portray as_html
command:Virtualenv I'm in has the
graphene-elastic
installed (python setup.py develop
).Installing it using
pip install graphene-elastic
orpython setup.py install
does not help.Is there specific directory structure expected? I run it from the project root here. Anything else I'm missing?
Portray version:
portray==1.3.0
.Any tips and help are appreciated. Thanks in advance!
The text was updated successfully, but these errors were encountered: