Uh oh!
There was an error while loading. Please reload this page.
Bugfix: check also module name cointaing "cloudsync" - #399
Conversation
Avoid a very weird bug with tensorflow: if tensorflow is imported before cloudsync, the package tensorboard.compat.tensorflow_stub.pywrap_tensorflow will pass the check on hasattr, while in fact it does not have that, causing a type error on the next line
earonesty
commented
Mar 28, 2022
Curious that it's a type error and not an attribute error. Feel like we should just try catch and just add typeerror to the list in addition to attribute error.... More pythonic anyway |
mp1994
commented
Mar 28, 2022
That’s indeed curios and weird! Still, I have a question about this part of the code: why checking for one attribute in all the imported modules, don’t we know already that the modules we are looking for have “cloudsync” in their name? I proposed a very quick-and-dirty fix; I can try to spend more time on it and make more elegant. |
earonesty
commented
Mar 28, 2022
via email
It's not necessarily the case that they will all have cloudsync in the name
Anyone can write a new module and they can name it whatever they want …On Mon, Mar 28, 2022, 6:08 PM mp1994 ***@***.***> wrote:
Curious that it's a type error and not an attribute error. Feel like we
should just try catch and just add typeerror to the list in addition to
attribute error.... More pythonic anyway
That’s indeed curios and weird! Still, I have a question about this part
of the code: why checking for one attribute in all the imported modules,
don’t we know already that the modules we are looking for have “cloudsync”
in their name?
I proposed a very quick-and-dirty fix; I can try to spend more time on it
and make more *elegant*.
—
Reply to this email directly, view it on GitHub
<#399 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAMMUIQBFWAWNLARUW2WUDVCIUWXANCNFSM5R4PCKAA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
mp1994
commented
Mar 29, 2022
The same is valid for attribute names! I am not totally sure I understand the point here. I guess we are looking for the "sub-packages" Let me know what's the best strategy to quickly fix this bug, and then we can work together on a better solution, if you want. |
|
Avoid a very weird bug with tensorflow: if tensorflow is imported before cloudsync, the package tensorboard.compat.tensorflow_stub.pywrap_tensorflow will pass the check on hasattr, while in fact it does not have that, causing a type error on the next line