Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #3028 (closed)

Opened 13 years ago

Closed 12 years ago

Bug: IPython seems to be broken on Windows

Reported by: jamoore Owned by: jamoore
Priority: major Milestone: OMERO-4.4
Component: Deployment Version: n.a.
Keywords: n.a. Cc:
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: 2012-01-17 (6)

Description (last modified by jmoore)

C:\omero_dist\bin>echo client.sf.getConfigService().getConfigValue('omero.data.
dir') | omero shell --login
ERROR:omero.util.UpgradeCheck:<urlopen error (10060, 'Operation timed out')>
Using session 9fa11cb9-4ff5-4715-8a2b-946f345930f5 (root@localhost). Idle timeou
t: 10.0 min. Current group: system
WARNING: Readline services not available on this platform.
WARNING: Proper color support under MS Windows requires the pyreadline library.
You can find it at:
http://ipython.scipy.org/moin/PyReadline/Intro
Gary's readline needs the ctypes module, from:
http://starship.python.net/crew/theller/ctypes
(Note that ctypes is already part of Python versions 2.5 and newer).

Defaulting color scheme to 'NoColor'
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)

C:\omero_dist\bin\omero in <module>()
    150         sys.exit(2)
    151
--> 152     rv = omero.cli.argv()
    153     sys.exit(rv)
    154 except KeyboardInterrupt, ki:

C:\omero_dist\lib\python\omero\cli.pyc in argv(args)
   1147
   1148         if len(args) > 1:
-> 1149             cli.invoke(args[1:])
   1150             return cli.rv
   1151         else:

C:\omero_dist\lib\python\omero\cli.pyc in invoke(self, line, strict, previous_ar
gs)
    700         try:
    701             line = self.precmd(line)
--> 702             stop = self.onecmd(line, previous_args)
    703             stop = self.postcmd(stop, line)
    704             if strict:

C:\omero_dist\lib\python\omero\cli.pyc in onecmd(self, line, previous_args)
    769                 self._stack.insert(0, line)
    770                 self.dbg("Stack+: %s" % len(self._stack), level=2)
--> 771                 self.execute(line, previous_args)
    772                 return True
    773             finally:

C:\omero_dist\lib\python\omero\cli.pyc in execute(self, line, previous_args)
    849         try:
    850             if len(debug_opts) == 0:
--> 851                 args.func(args)
    852             elif len(debug_opts) > 1:
    853                 self.die(9, "Conflicting debug options: %s" % ", ".join(
debug_opts))

C:\omero_dist\lib\python\omero\plugins\basics.py in __call__(self, args)
     79         from IPython.Shell import IPShellEmbed
     80         ipshell = IPShellEmbed(args.arg)
---> 81         ipshell(local_ns=ns)
     82
     83

C:\omero_dist\lib\fallback\IPython\Shell.pyc in __call__(self, header, local_ns,
global_ns, dummy)
    240         # Call the embedding code with a stack depth of 1 so it can skip
over
    241         # our call and get the original caller's namespaces.
--> 242         self.IP.embed_mainloop(banner,local_ns,global_ns,stack_depth=1)
    243
    244         if self.exit_msg:

C:\omero_dist\lib\fallback\IPython\iplib.pyc in embed_mainloop(self, header, loc
al_ns, global_ns, stack_depth)
   1834         # make sure the tab-completer has the correct frame information,
so it
   1835         # actually completes using the frame's locals/globals
-> 1836         self.set_completer_frame()
   1837
   1838         # before activating the interactive mode, we need to make sure t
hat

C:\omero_dist\lib\fallback\IPython\iplib.pyc in set_completer_frame(self, frame)

   1265             self.Completer.global_namespace = frame.f_globals
   1266         else:
-> 1267             self.Completer.namespace = self.user_ns
   1268             self.Completer.global_namespace = self.user_global_ns
   1269

AttributeError: 'InteractiveShell' object has no attribute 'Completer'

C:\omero_dist\bin>

Change History (3)

comment:1 Changed 12 years ago by jmoore

  • Milestone changed from Unscheduled to OMERO-Beta4.4
  • Owner set to jmoore
  • Remaining Time set to 0.25
  • Sprint set to 2012-01-17 (6)

comment:2 Changed 12 years ago by jmoore

  • Status changed from new to accepted

comment:3 Changed 12 years ago by jmoore

  • Description modified (diff)
  • Remaining Time changed from 0.25 to 0
  • Resolution set to worksforme
  • Status changed from accepted to closed

With the newest version, IPython works, though there are some things to be aware of.

Color warning

C:\ome.git\dist>bin\omero shell
WARNING: Readline services not available on this platform.
WARNING: Proper color support under MS Windows requires the pyreadline library.
You can find it at:
http://ipython.scipy.org/moin/PyReadline/Intro
Gary's readline needs the ctypes module, from:
http://starship.python.net/crew/theller/ctypes
(Note that ctypes is already part of Python versions 2.5 and newer).

Defaulting color scheme to 'NoColor'


In [1]: ^Z

Do you really want to exit ([y]/n)? y

Login before piping

C:\ome.git\dist>echo "client.sf.getConfigService().getConfigValue('omero.data.dir')" | omero shell --login
'omero' is not recognized as an internal or external command,
operable program or batch file.

C:\ome.git\dist>echo "client.sf.getConfigService().getConfigValue('omero.data.dir')" | bin\omero shell --login
Previous session expired for root on localhost:24064
Server: [localhost]Username: [root]Traceback (most recent call last):
  File "C:\ome.git\dist\bin\\omero", line 123, in <module>
    rv = omero.cli.argv()
  File "C:\ome.git\dist\lib\python\omero\cli.py", line 1183, in argv
    cli.invoke(args[1:])
  File "C:\ome.git\dist\lib\python\omero\cli.py", line 733, in invoke
    stop = self.onecmd(line, previous_args)
  File "C:\ome.git\dist\lib\python\omero\cli.py", line 802, in onecmd
    self.execute(line, previous_args)
  File "C:\ome.git\dist\lib\python\omero\cli.py", line 882, in execute
    args.func(args)
  File "C:\ome.git\dist\lib\python\omero\plugins\basics.py", line 76, in __call__
    client = self.ctx.conn(args)
  File "C:\ome.git\dist\lib\python\omero\cli.py", line 1047, in conn
    self.controls["sessions"].login(args)
  File "C:\ome.git\dist\lib\python\omero\plugins\sessions.py", line 224, in login
    if not name: name = self._get_username(previous[1])
  File "C:\ome.git\dist\lib\python\omero\plugins\sessions.py", line 507, in _get_username
    rv = self.ctx.input("Username: [%s]" % defuser)
  File "C:\ome.git\dist\lib\python\omero\cli.py", line 370, in input
    rv = raw_input(prompt)
EOFError: EOF when reading a line

Careful use of quotes

C:\ome.git\dist>echo "client.sf.getConfigService().getConfigValue('omero.data.dir')" | bin\omero shell --login
Using session 1bf8aac2-4a8a-4702-b370-589ac3c0c4ad (root@gretzky.openmicroscopy.org.uk:4064). Idle timeout: 10.0 min. Current group: system
...
In [1]: Out[1]: "client.sf.getConfigService().getConfigValue('omero.data.dir')"

Working version

C:\ome.git\dist>echo client.sf.getConfigService().getConfigValue('omero.data.dir') | bin\omero shell --login
Using session 1bf8aac2-4a8a-4702-b370-589ac3c0c4ad (root@gretzky.openmicroscopy.org.uk:4064). Idle timeout: 10.0 min. Current group: system
...
In [1]: Out[1]: '/OMERO/'

In [2]:
Do you really want to exit ([y]/n)?

C:\ome.git\dist>
Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.65872 sec.)

We're Hiring!