{"action":"opened","issue":{"url":"https://api.github.com/repos/python-gitlab/python-gitlab/issues/552","repository_url":"https://api.github.com/repos/python-gitlab/python-gitlab","labels_url":"https://api.github.com/repos/python-gitlab/python-gitlab/issues/552/labels{/name}","comments_url":"https://api.github.com/repos/python-gitlab/python-gitlab/issues/552/comments","events_url":"https://api.github.com/repos/python-gitlab/python-gitlab/issues/552/events","html_url":"https://github.com/python-gitlab/python-gitlab/issues/552","id":340439976,"node_id":"MDU6SXNzdWUzNDA0Mzk5NzY=","number":552,"title":"import_project with override_params","user":{"login":"jgeorgeson","id":10238523,"node_id":"MDQ6VXNlcjEwMjM4NTIz","avatar_url":"https://avatars2.githubusercontent.com/u/10238523?v=4","gravatar_id":"","url":"https://api.github.com/users/jgeorgeson","html_url":"https://github.com/jgeorgeson","followers_url":"https://api.github.com/users/jgeorgeson/followers","following_url":"https://api.github.com/users/jgeorgeson/following{/other_user}","gists_url":"https://api.github.com/users/jgeorgeson/gists{/gist_id}","starred_url":"https://api.github.com/users/jgeorgeson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgeorgeson/subscriptions","organizations_url":"https://api.github.com/users/jgeorgeson/orgs","repos_url":"https://api.github.com/users/jgeorgeson/repos","events_url":"https://api.github.com/users/jgeorgeson/events{/privacy}","received_events_url":"https://api.github.com/users/jgeorgeson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-11T23:29:37Z","updated_at":"2018-07-11T23:29:37Z","closed_at":null,"author_association":"NONE","body":"## Description of the problem, including code/CLI snippet\r\n\r\nI'm trying to set private visibility on the imported project, and GitLab is returning a 400 error that my override_params are invalid.\r\n\r\n```python\r\n        import_params={}\r\n        import_params['visibility'] = 'private'\r\n        gl.projects.import_project(\r\n            open(filename, 'rb'),\r\n            project,\r\n            namespace=group,\r\n            override_params=import_params\r\n        )\r\n```\r\n\r\nI also tried with defining the dictionary as `import_params = {'visibility': 'private'}` and also supplying the dictionary inline (ie without the `import_params` object).\r\n\r\nI had some trouble getting the API to work with curl, but was able to accomplish it with this syntax `--form \"override_params[visibility]=private\"`.\r\n\r\nI was hoping to run the CLI version in debug mode to see what request is being made, but it looks like the is no CLI exposed for this method. \r\n\r\n## Expected Behavior\r\n\r\nProject is imported with private visibility\r\n\r\n## Actual Behavior\r\n\r\n```python\r\nTraceback (most recent call last):\r\n  File \"./main.py\", line 80, in import_project\r\n    'visibility': 'private'\r\n  File \"/usr/local/lib/python3.6/site-packages/gitlab/v4/objects.py\", line 3612, in import_project\r\n    files=files, **kwargs)\r\n  File \"/usr/local/lib/python3.6/site-packages/gitlab/__init__.py\", line 589, in http_post\r\n    post_data=post_data, files=files, **kwargs)\r\n  File \"/usr/local/lib/python3.6/site-packages/gitlab/__init__.py\", line 495, in http_request\r\n    response_body=result.content)\r\ngitlab.exceptions.GitlabHttpError: 400: b'{\"error\":\"override_params is invalid\"}'\r\n```\r\n\r\n## Specifications\r\n\r\n  - python-gitlab version: 1.5.1\r\n  - API version you are using (v3/v4): v4\r\n  - Gitlab server version (or gitlab.com): 10.7.5\r\n"}}
{"actor":{"display_login":"jgeorgeson"}}