Warning in Spyder iPython window whenever I create a canvas in Vispy












0














Every time I create a vispy Canvas instance in Spyder:



from vispy import app

class Canvas(app.Canvas):
def __init__(self):
app.Canvas.__init__(self)

canvas = Canvas()


I start to get warnings like the following in the iPython window:



WARNING: QSocketNotifier: Multiple socket notifiers for same socket 1048 and type Read


Once the canvas instance is created, whenever I type in the iPython console in Spyder, this error starts to occur, so I can't do things like explore modules via tab completion (the warning obliterates the dropdown menu). It also tends to randomly insert itself in stack traces and other places in the console, generally disrupting my workflow (in non-catastrophic ways).



I tried turning off the Warning by turning off Real-time code analysis, as suggested here:
How to suppress a certain warning in Spyder editor?

But it didn't affect the behavior.



I am in Spyder version: 3.2.8 (in an environment that includes spyder-kernels 0.2.6), Python version: 3.6.6, Qt version: 5.6.2, PyQt5 version: 5.6 in Windows 10. This has happened on all three Windows 10 machines I use. I'm running this all in Anaconda. When I run the above code just in the python shell, or from the pure iPython shell, I do not get the warning.










share|improve this question
























  • (Spyder maintainer here) Does the same warning is shown in a terminal Python or IPython interpreters?
    – Carlos Cordoba
    Nov 10 at 21:35












  • @CarlosCordoba it doesn't happen in the python/iPython shell. Note in case it matters I am using Anaconda, and in an environment that also has spyder-kernels 1.1.0. Note also I just tested this on a newer setup (with Python 3.7, and newest Spyder) and I am not getting this warning. That said, I am using an application that uses 3.6 and vispy so I can't just switch. But I do realize that means this problem should probably be a low priority. :)
    – neuronet
    Nov 11 at 3:27








  • 1




    I'd say this is problem with Vispy trying to use its Qt backend in the same console as Spyder has created a Qt application (with %gui qt), but it's hard to tell for me without going deeper into this issue, for which I don't have time, sorry.
    – Carlos Cordoba
    Nov 11 at 4:24










  • @CarlosCordoba good eye: before the magic (%gui qt) I am not getting the warning, and after...I am. Unfortunately I need to enter the magic to get vispy to work.
    – neuronet
    Nov 19 at 18:22






  • 1




    Yeah, I'm sure you need to run %gui qt to use the Vispy's Qt backend. So I think you two choices here: 1) Use a different Vispy backend (I think Vispy comes with several backends); and 2) Open an issue in the Vispy issues tracker and talk to its devs to see if this can be solved on their side (e.g. by trying to detect if a Qt app is already running and not creating a new one in that case).
    – Carlos Cordoba
    Nov 19 at 22:02
















0














Every time I create a vispy Canvas instance in Spyder:



from vispy import app

class Canvas(app.Canvas):
def __init__(self):
app.Canvas.__init__(self)

canvas = Canvas()


I start to get warnings like the following in the iPython window:



WARNING: QSocketNotifier: Multiple socket notifiers for same socket 1048 and type Read


Once the canvas instance is created, whenever I type in the iPython console in Spyder, this error starts to occur, so I can't do things like explore modules via tab completion (the warning obliterates the dropdown menu). It also tends to randomly insert itself in stack traces and other places in the console, generally disrupting my workflow (in non-catastrophic ways).



I tried turning off the Warning by turning off Real-time code analysis, as suggested here:
How to suppress a certain warning in Spyder editor?

But it didn't affect the behavior.



I am in Spyder version: 3.2.8 (in an environment that includes spyder-kernels 0.2.6), Python version: 3.6.6, Qt version: 5.6.2, PyQt5 version: 5.6 in Windows 10. This has happened on all three Windows 10 machines I use. I'm running this all in Anaconda. When I run the above code just in the python shell, or from the pure iPython shell, I do not get the warning.










share|improve this question
























  • (Spyder maintainer here) Does the same warning is shown in a terminal Python or IPython interpreters?
    – Carlos Cordoba
    Nov 10 at 21:35












  • @CarlosCordoba it doesn't happen in the python/iPython shell. Note in case it matters I am using Anaconda, and in an environment that also has spyder-kernels 1.1.0. Note also I just tested this on a newer setup (with Python 3.7, and newest Spyder) and I am not getting this warning. That said, I am using an application that uses 3.6 and vispy so I can't just switch. But I do realize that means this problem should probably be a low priority. :)
    – neuronet
    Nov 11 at 3:27








  • 1




    I'd say this is problem with Vispy trying to use its Qt backend in the same console as Spyder has created a Qt application (with %gui qt), but it's hard to tell for me without going deeper into this issue, for which I don't have time, sorry.
    – Carlos Cordoba
    Nov 11 at 4:24










  • @CarlosCordoba good eye: before the magic (%gui qt) I am not getting the warning, and after...I am. Unfortunately I need to enter the magic to get vispy to work.
    – neuronet
    Nov 19 at 18:22






  • 1




    Yeah, I'm sure you need to run %gui qt to use the Vispy's Qt backend. So I think you two choices here: 1) Use a different Vispy backend (I think Vispy comes with several backends); and 2) Open an issue in the Vispy issues tracker and talk to its devs to see if this can be solved on their side (e.g. by trying to detect if a Qt app is already running and not creating a new one in that case).
    – Carlos Cordoba
    Nov 19 at 22:02














0












0








0







Every time I create a vispy Canvas instance in Spyder:



from vispy import app

class Canvas(app.Canvas):
def __init__(self):
app.Canvas.__init__(self)

canvas = Canvas()


I start to get warnings like the following in the iPython window:



WARNING: QSocketNotifier: Multiple socket notifiers for same socket 1048 and type Read


Once the canvas instance is created, whenever I type in the iPython console in Spyder, this error starts to occur, so I can't do things like explore modules via tab completion (the warning obliterates the dropdown menu). It also tends to randomly insert itself in stack traces and other places in the console, generally disrupting my workflow (in non-catastrophic ways).



I tried turning off the Warning by turning off Real-time code analysis, as suggested here:
How to suppress a certain warning in Spyder editor?

But it didn't affect the behavior.



I am in Spyder version: 3.2.8 (in an environment that includes spyder-kernels 0.2.6), Python version: 3.6.6, Qt version: 5.6.2, PyQt5 version: 5.6 in Windows 10. This has happened on all three Windows 10 machines I use. I'm running this all in Anaconda. When I run the above code just in the python shell, or from the pure iPython shell, I do not get the warning.










share|improve this question















Every time I create a vispy Canvas instance in Spyder:



from vispy import app

class Canvas(app.Canvas):
def __init__(self):
app.Canvas.__init__(self)

canvas = Canvas()


I start to get warnings like the following in the iPython window:



WARNING: QSocketNotifier: Multiple socket notifiers for same socket 1048 and type Read


Once the canvas instance is created, whenever I type in the iPython console in Spyder, this error starts to occur, so I can't do things like explore modules via tab completion (the warning obliterates the dropdown menu). It also tends to randomly insert itself in stack traces and other places in the console, generally disrupting my workflow (in non-catastrophic ways).



I tried turning off the Warning by turning off Real-time code analysis, as suggested here:
How to suppress a certain warning in Spyder editor?

But it didn't affect the behavior.



I am in Spyder version: 3.2.8 (in an environment that includes spyder-kernels 0.2.6), Python version: 3.6.6, Qt version: 5.6.2, PyQt5 version: 5.6 in Windows 10. This has happened on all three Windows 10 machines I use. I'm running this all in Anaconda. When I run the above code just in the python shell, or from the pure iPython shell, I do not get the warning.







python-3.x pyqt5 spyder vispy






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 11 at 3:02

























asked Nov 10 at 20:03









neuronet

1,82933075




1,82933075












  • (Spyder maintainer here) Does the same warning is shown in a terminal Python or IPython interpreters?
    – Carlos Cordoba
    Nov 10 at 21:35












  • @CarlosCordoba it doesn't happen in the python/iPython shell. Note in case it matters I am using Anaconda, and in an environment that also has spyder-kernels 1.1.0. Note also I just tested this on a newer setup (with Python 3.7, and newest Spyder) and I am not getting this warning. That said, I am using an application that uses 3.6 and vispy so I can't just switch. But I do realize that means this problem should probably be a low priority. :)
    – neuronet
    Nov 11 at 3:27








  • 1




    I'd say this is problem with Vispy trying to use its Qt backend in the same console as Spyder has created a Qt application (with %gui qt), but it's hard to tell for me without going deeper into this issue, for which I don't have time, sorry.
    – Carlos Cordoba
    Nov 11 at 4:24










  • @CarlosCordoba good eye: before the magic (%gui qt) I am not getting the warning, and after...I am. Unfortunately I need to enter the magic to get vispy to work.
    – neuronet
    Nov 19 at 18:22






  • 1




    Yeah, I'm sure you need to run %gui qt to use the Vispy's Qt backend. So I think you two choices here: 1) Use a different Vispy backend (I think Vispy comes with several backends); and 2) Open an issue in the Vispy issues tracker and talk to its devs to see if this can be solved on their side (e.g. by trying to detect if a Qt app is already running and not creating a new one in that case).
    – Carlos Cordoba
    Nov 19 at 22:02


















  • (Spyder maintainer here) Does the same warning is shown in a terminal Python or IPython interpreters?
    – Carlos Cordoba
    Nov 10 at 21:35












  • @CarlosCordoba it doesn't happen in the python/iPython shell. Note in case it matters I am using Anaconda, and in an environment that also has spyder-kernels 1.1.0. Note also I just tested this on a newer setup (with Python 3.7, and newest Spyder) and I am not getting this warning. That said, I am using an application that uses 3.6 and vispy so I can't just switch. But I do realize that means this problem should probably be a low priority. :)
    – neuronet
    Nov 11 at 3:27








  • 1




    I'd say this is problem with Vispy trying to use its Qt backend in the same console as Spyder has created a Qt application (with %gui qt), but it's hard to tell for me without going deeper into this issue, for which I don't have time, sorry.
    – Carlos Cordoba
    Nov 11 at 4:24










  • @CarlosCordoba good eye: before the magic (%gui qt) I am not getting the warning, and after...I am. Unfortunately I need to enter the magic to get vispy to work.
    – neuronet
    Nov 19 at 18:22






  • 1




    Yeah, I'm sure you need to run %gui qt to use the Vispy's Qt backend. So I think you two choices here: 1) Use a different Vispy backend (I think Vispy comes with several backends); and 2) Open an issue in the Vispy issues tracker and talk to its devs to see if this can be solved on their side (e.g. by trying to detect if a Qt app is already running and not creating a new one in that case).
    – Carlos Cordoba
    Nov 19 at 22:02
















(Spyder maintainer here) Does the same warning is shown in a terminal Python or IPython interpreters?
– Carlos Cordoba
Nov 10 at 21:35






(Spyder maintainer here) Does the same warning is shown in a terminal Python or IPython interpreters?
– Carlos Cordoba
Nov 10 at 21:35














@CarlosCordoba it doesn't happen in the python/iPython shell. Note in case it matters I am using Anaconda, and in an environment that also has spyder-kernels 1.1.0. Note also I just tested this on a newer setup (with Python 3.7, and newest Spyder) and I am not getting this warning. That said, I am using an application that uses 3.6 and vispy so I can't just switch. But I do realize that means this problem should probably be a low priority. :)
– neuronet
Nov 11 at 3:27






@CarlosCordoba it doesn't happen in the python/iPython shell. Note in case it matters I am using Anaconda, and in an environment that also has spyder-kernels 1.1.0. Note also I just tested this on a newer setup (with Python 3.7, and newest Spyder) and I am not getting this warning. That said, I am using an application that uses 3.6 and vispy so I can't just switch. But I do realize that means this problem should probably be a low priority. :)
– neuronet
Nov 11 at 3:27






1




1




I'd say this is problem with Vispy trying to use its Qt backend in the same console as Spyder has created a Qt application (with %gui qt), but it's hard to tell for me without going deeper into this issue, for which I don't have time, sorry.
– Carlos Cordoba
Nov 11 at 4:24




I'd say this is problem with Vispy trying to use its Qt backend in the same console as Spyder has created a Qt application (with %gui qt), but it's hard to tell for me without going deeper into this issue, for which I don't have time, sorry.
– Carlos Cordoba
Nov 11 at 4:24












@CarlosCordoba good eye: before the magic (%gui qt) I am not getting the warning, and after...I am. Unfortunately I need to enter the magic to get vispy to work.
– neuronet
Nov 19 at 18:22




@CarlosCordoba good eye: before the magic (%gui qt) I am not getting the warning, and after...I am. Unfortunately I need to enter the magic to get vispy to work.
– neuronet
Nov 19 at 18:22




1




1




Yeah, I'm sure you need to run %gui qt to use the Vispy's Qt backend. So I think you two choices here: 1) Use a different Vispy backend (I think Vispy comes with several backends); and 2) Open an issue in the Vispy issues tracker and talk to its devs to see if this can be solved on their side (e.g. by trying to detect if a Qt app is already running and not creating a new one in that case).
– Carlos Cordoba
Nov 19 at 22:02




Yeah, I'm sure you need to run %gui qt to use the Vispy's Qt backend. So I think you two choices here: 1) Use a different Vispy backend (I think Vispy comes with several backends); and 2) Open an issue in the Vispy issues tracker and talk to its devs to see if this can be solved on their side (e.g. by trying to detect if a Qt app is already running and not creating a new one in that case).
– Carlos Cordoba
Nov 19 at 22:02

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53242930%2fwarning-in-spyder-ipython-window-whenever-i-create-a-canvas-in-vispy%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53242930%2fwarning-in-spyder-ipython-window-whenever-i-create-a-canvas-in-vispy%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







這個網誌中的熱門文章

Academy of Television Arts & Sciences

L'Équipe

1995 France bombings