-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
core\common.py:496: ModuleNotFoundError #24690
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
Comments
I believe that's IPython-specific logic, but I'm 100% familiar with the rationale behind it. We probably could |
Can you try this on master? I don't even see the function from your traceback there so I assume you are working with an older copy of pandas (though |
I’m using pandas 0.23.4, which I think is the latest in anaconda.
… On 10 Jan 2019, at 05:23, William Ayd ***@***.***> wrote:
Can you try this on master? I don't even see the function from your traceback there so I assume you are working with an older copy of pandas (though pd.show_versions() would also be helpful)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Under what circumstances is `__main__` not defined? If necessary, we can
but that import in a `try / except` block.
On Thu, Jan 10, 2019 at 2:18 AM Nicolas Dickreuter <[email protected]>
wrote:
… I’m using pandas 0.23.4, which I think is the latest in anaconda.
> On 10 Jan 2019, at 05:23, William Ayd ***@***.***> wrote:
>
> Can you try this on master? I don't even see the function from your
traceback there so I assume you are working with an older copy of pandas
(though pd.show_versions() would also be helpful)
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub, or mute the thread.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#24690 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQHIslhsyZg4vc-U9Kb7z6Gq9Pq-FzQks5vBvdLgaJpZM4Z4hGD>
.
|
In my case I’m running pytest. When I run it individually on the failing test it passes, but then I run it in conjunction with a pylint test, then I get this error.
… On 10 Jan 2019, at 12:39, Tom Augspurger ***@***.***> wrote:
Under what circumstances is `__main__` not defined? If necessary, we can
but that import in a `try / except` block.
On Thu, Jan 10, 2019 at 2:18 AM Nicolas Dickreuter ***@***.***>
wrote:
> I’m using pandas 0.23.4, which I think is the latest in anaconda.
>
> > On 10 Jan 2019, at 05:23, William Ayd ***@***.***> wrote:
> >
> > Can you try this on master? I don't even see the function from your
> traceback there so I assume you are working with an older copy of pandas
> (though pd.show_versions() would also be helpful)
> >
> > —
> > You are receiving this because you authored the thread.
> > Reply to this email directly, view it on GitHub, or mute the thread.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#24690 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ABQHIslhsyZg4vc-U9Kb7z6Gq9Pq-FzQks5vBvdLgaJpZM4Z4hGD>
> .
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
but then I run it in conjunction with a pylint test, then I get this
error.
What do you mean by "pylint test"?
Does `__main__` not existing seem strange to anyone else? If it happen as
part of a normal workflow, then
it'd be fine to catch that exception. But it's abnormal, I'd like to not
catch it to avoid hiding a potentially real issue.
On Thu, Jan 10, 2019 at 7:37 AM Nicolas Dickreuter <[email protected]>
wrote:
… In my case I’m running pytest. When I run it individually on the failing
test it passes, but then I run it in conjunction with a pylint test, then I
get this error.
> On 10 Jan 2019, at 12:39, Tom Augspurger ***@***.***>
wrote:
>
> Under what circumstances is `__main__` not defined? If necessary, we can
> but that import in a `try / except` block.
>
> On Thu, Jan 10, 2019 at 2:18 AM Nicolas Dickreuter <
***@***.***>
> wrote:
>
> > I’m using pandas 0.23.4, which I think is the latest in anaconda.
> >
> > > On 10 Jan 2019, at 05:23, William Ayd ***@***.***>
wrote:
> > >
> > > Can you try this on master? I don't even see the function from your
> > traceback there so I assume you are working with an older copy of
pandas
> > (though pd.show_versions() would also be helpful)
> > >
> > > —
> > > You are receiving this because you authored the thread.
> > > Reply to this email directly, view it on GitHub, or mute the thread.
> >
> > —
> > You are receiving this because you were mentioned.
> > Reply to this email directly, view it on GitHub
> > <
#24690 (comment)>,
> > or mute the thread
> > <
https://github.com/notifications/unsubscribe-auth/ABQHIslhsyZg4vc-U9Kb7z6Gq9Pq-FzQks5vBvdLgaJpZM4Z4hGD
>
> > .
> >
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub, or mute the thread.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#24690 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQHIiyry9J8JBd3cKXSE38zj7QWNVXLks5vB0IogaJpZM4Z4hGD>
.
|
WIth pylint test I mean something like the attached. It's a test that runs pylint. The pandas error occurs in a different test, but it only occurs when this pylint test is active. This PR fixes the issue: #24714 |
It looks like the source of the problem is this: https://github.com/PyCQA/pylint/blob/master/pylint/lint.py#L145 Pylint is mocking main and then pandas cannot find it. Apparently, this is related to a python bug. |
Thanks for looking. So it's only an issue on Python2?
…On Fri, Jan 11, 2019 at 6:26 AM Nicolas Dickreuter ***@***.***> wrote:
It looks like the source of the problem is this:
https://github.com/PyCQA/pylint/blob/master/pylint/lint.py#L145
Pylint is mocking main and then pandas cannot find it. Apparently, this is
related to a python bug.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#24690 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQHIhkSvQgXQj44X3r7z1EvS5wyqHUhks5vCILkgaJpZM4Z4hGD>
.
|
No it's python3 in my case |
Actually, the line causing the issue is this: https://github.com/PyCQA/pylint/blob/master/pylint/lint.py#L153. It's only called when pylint is used in multiprocessing. Not sure pandas should rely on main existing. Probably a fix would make sense both in pylint and pandas? |
In circumstances that I cannot reproduce in a small code example, I get the following error:
When looking at common.py, it seems that main does indeed not exist. Does anybody know why and under what circumstances this is called?
The text was updated successfully, but these errors were encountered: