pycharm and guest worker errors

#1

I have created a very simple guest worker that launches and runs correctly from a console command line. If I try running the same code within Pycharm, imports are not found.
I am running pypy in a virtual environment. If instead of using a guest, I use a native container, Pycharm has no problems in importing.

It is currently complaining about not finding zope from

Here is the guest portion of my config file:

{
   "type": "guest",
   "executable": "pypy",
   "arguments": ["test_guest.py"],
   "options": {
      "env": {
        "inherit":["PYTHONPATH"]
      },
      "workdir": "../test_guest",
      "watch": {
         "directories": ["../test_guest"],
         "action": "restart"
      }
   }
}



Any ideas on how to correct the problem? I have set PYTHONPATH in Pycharm and have set the virtual environment correctly in Pycharm as well.

0 Likes

#2

I now believe that the problem is not within crossbar, but pycharm itself. I submitted a bug report and if it gets resolved, i will post the resolution.

···

On Monday, March 9, 2015 at 11:21:40 AM UTC-4, Alan Yorinks wrote:

I have created a very simple guest worker that launches and runs correctly from a console command line. If I try running the same code within Pycharm, imports are not found.
I am running pypy in a virtual environment. If instead of using a guest, I use a native container, Pycharm has no problems in importing.

It is currently complaining about not finding zope from

Here is the guest portion of my config file:

{
   "type": "guest",
   "executable": "pypy",
   "arguments": ["test_guest.py"],
   "options": {
      "env": {
        "inherit":["PYTHONPATH"]
      },
      "workdir": "../test_guest",
      "watch": {
         "directories": ["../test_guest"],
         "action": "restart"
      }
   }
}






Any ideas on how to correct the problem? I have set PYTHONPATH in Pycharm and have set the virtual environment correctly in Pycharm as well.

0 Likes

#3

Hi Alan,

sorry, I have no clue. What happens if you set the PYTHONPATH explicitly in the container/guest configuration (not inheriting the env var)?

/Tobias

···

Am Montag, 9. März 2015 17:20:00 UTC+1 schrieb Alan Yorinks:

I now believe that the problem is not within crossbar, but pycharm itself. I submitted a bug report and if it gets resolved, i will post the resolution.

On Monday, March 9, 2015 at 11:21:40 AM UTC-4, Alan Yorinks wrote:

I have created a very simple guest worker that launches and runs correctly from a console command line. If I try running the same code within Pycharm, imports are not found.
I am running pypy in a virtual environment. If instead of using a guest, I use a native container, Pycharm has no problems in importing.

It is currently complaining about not finding zope from

Here is the guest portion of my config file:

{
   "type": "guest",
   "executable": "pypy",
   "arguments": ["test_guest.py"],
   "options": {
      "env": {
        "inherit":["PYTHONPATH"]
      },
      "workdir": "../test_guest",
      "watch": {
         "directories": ["../test_guest"],
         "action": "restart"
      }
   }
}






Any ideas on how to correct the problem? I have set PYTHONPATH in Pycharm and have set the virtual environment correctly in Pycharm as well.

0 Likes

#4

Hi Tobias,
     Thanks for the reply. Setting PYTHONPATH did not change the behavior. I am currently working with the PyCharm folks and when a resolution is found, I will post it here.

Alan

···

On 03/15/2015 08:43 AM, Tobias Oberstein wrote:

Hi Alan,

sorry, I have no clue. What happens if you set the PYTHONPATH explicitly in the container/guest configuration (not inheriting the env var)?

/Tobias

Am Montag, 9. März 2015 17:20:00 UTC+1 schrieb Alan Yorinks:

    I now believe that the problem is not within crossbar, but pycharm
    itself. I submitted a bug report and if it gets resolved, i will
    post the resolution.

    On Monday, March 9, 2015 at 11:21:40 AM UTC-4, Alan Yorinks wrote:

        I have created a very simple guest worker that launches and
        runs correctly from a console command line. If I try running
        the same code within Pycharm, imports are not found.
        I am running pypy in a virtual environment. If instead of
        using a guest, I use a native container, Pycharm has no
        problems in importing.

        It is currently complaining about not finding zope from

        Here is the guest portion of my config file:

        {
            "type":"guest",
            "executable":"pypy",
            "arguments": ["test_guest.py"],
            "options": {
               "env": {
                 "inherit":["PYTHONPATH"]
               },
               "workdir":"../test_guest",
               "watch": {
                  "directories": ["../test_guest"],
                  "action":"restart"
               }
            }
        }

        Any ideas on how to correct the problem? I have set PYTHONPATH
        in Pycharm and have set the virtual environment correctly in
        Pycharm as well.

--
You received this message because you are subscribed to a topic in the Google Groups "Crossbar" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/crossbario/bnvp0iOpWBg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to crossbario+...@googlegroups.com <mailto:crossbario+...@googlegroups.com>.
To post to this group, send email to cross...@googlegroups.com <mailto:cross...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/crossbario/00776c51-b450-4a42-b2be-2f893fb1c4a1%40googlegroups.com <https://groups.google.com/d/msgid/crossbario/00776c51-b450-4a42-b2be-2f893fb1c4a1%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

0 Likes

#5

Have you tried right clicking on the directory in PyCharm and (at bottom of context menu) Mark directory as --> Sources root?

0 Likes

#6

Yes, and the PyCharm folks have never found a solution.

···

On Monday, March 9, 2015 at 11:21:40 AM UTC-4, Alan Yorinks wrote:

I have created a very simple guest worker that launches and runs correctly from a console command line. If I try running the same code within Pycharm, imports are not found.
I am running pypy in a virtual environment. If instead of using a guest, I use a native container, Pycharm has no problems in importing.

It is currently complaining about not finding zope from

Here is the guest portion of my config file:

{
   "type": "guest",
   "executable": "pypy",
   "arguments": ["test_guest.py"],
   "options": {
      "env": {
        "inherit":["PYTHONPATH"]
      },
      "workdir": "../test_guest",
      "watch": {
         "directories": ["../test_guest"],
         "action": "restart"
      }
   }
}






Any ideas on how to correct the problem? I have set PYTHONPATH in Pycharm and have set the virtual environment correctly in Pycharm as well.

0 Likes