FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Unable to import a project with .tar.gz file · Issue #630 · python-gitlab/python-gitlab · GitHub

Repository navigation

Unable to import a project with .tar.gz file #630

Description

Trying to import a .tar.gz file generated by an export.Observed that the script fails to import the project
Fails on Omnibus 11.3.4 instance

Expected Behavior

Import script is successful

Actual Behavior

Output variable is not defined in scope.

Specifications

  • python-gitlab version: 1.6
  • API version you are using (v3/v4):v4
  • Gitlab server version (or gitlab.com): private instance with 11.3.4

Activity

  1. vikramuk commented on Nov 13, 2018

    Author

    https://python-gitlab.readthedocs.io/en/stable/gl_objects/projects.html#import-export

    Output is not defined..

    gl.projects.import_project(open('/tmp/export.tgz', 'rb'), 'my_new_project')

    Get a ProjectImport object to track the import status

    _project_import = gl.projects.get(output['id'], lazy=True).imports.get()
    while project_import.import_status != 'finished':
        time.sleep(1)
        project_import.refresh()_
    

    I note that output is defined in output = gl.projects.import_project(open('/tmp/gitlab-export.tgz', 'rb'),

    Please update documentation snippet in the PDF/WebURL.

            output = gl.projects.import_project(open('/tmp/gitlab-export.tgz', 'rb'),'imported_project')
    	project_import = gl.projects.get(output['id'], lazy=True).imports.get()
    	count = 0
    	while project_import.import_status != 'finished':
    		time.sleep(1)
    		project_import.refresh()
    		count += 1
    		if count == 10:
    			raise Exception('Project import taking too much time')

    Request you to update the documentation snippet and Close the Issue.

  2. amitanand123infogix commented on Nov 13, 2018

    I am also facing same issue

  3. added a commit that references this issue on Nov 19, 2018
    b93f2a9
  4. added a commit that references this issue on Nov 22, 2018
    c8eaeb2
  5. locked as resolved and limited conversation to collaborators on Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL