I’ m trying to create an inline comment via conduit but get an error:
>>> api.differential.createinline(revisionID=1, filePath=new_path, isNewFile=False, lineNumber=40, content=content)
Traceback (most recent call last):
File "/Users/ericsalemi/Library/Application Support/JetBrains/Toolbox/apps/IDEA-C/ch-0/203.6682.168/IntelliJ IDEA CE.app.plugins/python-ce/helpers/pydev/_pydevd_bundle/pydevd_exec2.py", line 3, in Exec
exec(exp, global_vars, local_vars)
File "<input>", line 1, in <module>
File "/Users/ericsalemi/vcs/ci/venv/lib/python3.9/site-packages/phabricator/__init__.py", line 253, in __call__
return self._request(**kwargs)
File "/Users/ericsalemi/vcs/ci/venv/lib/python3.9/site-packages/phabricator/__init__.py", line 315, in _request
data = self._parse_response(response.text)
File "/Users/ericsalemi/vcs/ci/venv/lib/python3.9/site-packages/phabricator/__init__.py", line 325, in _parse_response
raise APIError(parsed['error_code'], parsed['error_info'])
phabricator.APIError: ERR-CONDUIT-CORE: #1366: Incorrect integer value: '' for column `bitnami_phabricator_differential`.`differential_transaction_comment`.`isNewFile` at row 1
The MySQL type for the isNewFile
field is tinyint
:
MariaDB [bitnami_phabricator_differential]> SELECT DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'differential_transaction_comment' AND COLUMN_NAME = 'isNewFile';
+-----------+
| DATA_TYPE |
+-----------+
| tinyint |
+-----------+
1 row in set (0.005 sec)
I’m not sure where the problem is but because the isNewFile
conduit parameter is required bool
I assumed using the Python value False
is the right thing to do. The fact the MySQL type is tinyint
worries me and make me think there might be a type mismatch. For info, creating the inline comment via the UI works perfectly.
Phabricator version:
86ad69863930 (Oct 19 2020)