Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
P
python-ligo-lw
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 5
    • Merge Requests 5
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Kipp Cannon
  • python-ligo-lw
  • Issues
  • #14

Closed
Open
Opened Jun 03, 2020 by Patrick Godwin@patrick.godwin

tmp_path kwarg in dbtables.get_connection_filename not working for python 3

This appears to be leveraging temporary_file.unlink(), which was an undocumented feature in python 2 and doesn't exist in python 3. Some more information in https://stackoverflow.com/a/28067461.

A traceback from a gstlal job failing when using this functionality:

Traceback (most recent call last):
  File "/usr/bin/gstlal_inspiral_plotsummary", line 1814, in <module>
    working_filename = dbtables.get_connection_filename(filename, tmp_path = options.tmp_space, verbose = options.verbose)
  File "/usr/lib64/python3.6/site-packages/ligo/lw/dbtables.py", line 253, in get_connection_filename
    target = mktmp(tmp_path, suffix = ".".join(os.path.split(filename)[-1].split(".")[1:]), verbose = verbose)
  File "/usr/lib64/python3.6/site-packages/ligo/lw/dbtables.py", line 196, in mktmp
    def new_unlink(self, orig_unlink = temporary_file.unlink):
  File "/usr/lib64/python3.6/tempfile.py", line 480, in __getattr__
    a = getattr(file, name)
AttributeError: '_io.BufferedRandom' object has no attribute 'unlink'
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: kipp.cannon/python-ligo-lw#14