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 #4451 (closed)

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

Bug: path.path object set in os.environ

Reported by: jamoore Owned by: jamoore
Priority: critical Milestone: OMERO-Beta4.3
Component: OmeroPy Version: n.a.
Keywords: n.a. Cc: atarkowska, cneves, cxallan, wmoore
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: 2011-02-24 (6)

Description

On Windows, objects of type path.path cause the exception below. Therefore, usages like the following should be avoided:

$ git grep -E "os.environ\[.*\].*?=.*?dir"
components/tools/OmeroPy/src/omero/plugins/web.py:        os.environ['ICE_CONFIG'] = self.ctx.dir / "etc" / "ice.config"
components/tools/OmeroPy/src/omero/plugins/web.py:        os.environ['PATH'] = os.environ.get('PATH', '.') + ':' + self.ctx.dir / 'bin'
components/tools/OmeroPy/src/omero/plugins/web.py:        os.environ['ICE_CONFIG'] = self.ctx.dir / "etc" / "ice.config"
components/tools/OmeroPy/src/omero/plugins/web.py:        os.environ['PATH'] = os.environ.get('PATH', '.') + ':' + self.ctx.dir / 'bin'
components/tools/OmeroPy/src/omero/plugins/web.py:            os.environ['ICE_CONFIG'] = self.ctx.dir / "etc" / "ice.config"
components/tools/OmeroPy/src/omero/plugins/web.py:            os.environ['PATH'] = os.environ.get('PATH', '.') + ':' + self.ctx.dir / 'bin'

Exception

C:\hudson\workspace\OMERO-trunk-components\component\web\label\x86-windows\src>python dist\bin\omero web test webadmin 
Traceback (most recent call last):
 File "dist\bin\omero", line 123, in <module>
   rv = omero.cli.argv()
 File "C:\hudson\workspace\OMERO-trunk-components\component\web\label\x86-windows\src\dist\lib\python\omero\cli.py", line 1151, in argv
   cli.invoke(args[1:])
 File "C:\hudson\workspace\OMERO-trunk-components\component\web\label\x86-windows\src\dist\lib\python\omero\cli.py", line 704, in invoke
   stop = self.onecmd(line, previous_args)
 File "C:\hudson\workspace\OMERO-trunk-components\component\web\label\x86-windows\src\dist\lib\python\omero\cli.py", line 773, in onecmd
   self.execute(line, previous_args)
 File "C:\hudson\workspace\OMERO-trunk-components\component\web\label\x86-windows\src\dist\lib\python\omero\cli.py", line 853, in execute
   args.func(args)
 File "C:\hudson\workspace\OMERO-trunk-components\component\web\label\x86-windows\src\dist\lib\python\omero\plugins\web.py", line 250, in test
   rv = self.ctx.call(cargs, cwd = location)
 File "C:\hudson\workspace\OMERO-trunk-components\component\web\label\x86-windows\src\dist\lib\python\omero\cli.py", line 931, in call
   rv = subprocess.call(args, env = self._env(), cwd = self._cwd(cwd))
 File "C:\Python26\lib\subprocess.py", line 470, in call
   return Popen(*popenargs, **kwargs).wait()
 File "C:\Python26\lib\subprocess.py", line 623, in __init__
   errread, errwrite)
 File "C:\Python26\lib\subprocess.py", line 833, in _execute_child
   startupinfo)
TypeError: environment can only contain strings

Change History (3)

comment:1 Changed 13 years ago by jmoore

  • Status changed from new to accepted

comment:2 Changed 13 years ago by jmoore <josh@…>

  • Remaining Time changed from 0.1 to 0
  • Resolution set to fixed
  • Status changed from accepted to closed

(In [3e10695c8de9b29ee496b83fca24ecfb79c4e405/ome.git] on branch develop) Wrap path.path objects with str() in plugins/web.py (See #4404, Fix #4451)

comment:3 Changed 13 years ago by jmoore <josh@…>

(In [f020d9d5ee57a1f2a8fd27fdc007ec97eaddb65b/ome.git] on branch dev_4_2) Wrap path.path objects with str() in plugins/web.py (See #4404, Fix #4451)

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.71823 sec.)

We're Hiring!