Title: Unable to write a single column to cloud spanner · Issue #3435 · googleapis/google-cloud-python · GitHub
Open Graph Title: Unable to write a single column to cloud spanner · Issue #3435 · googleapis/google-cloud-python
X Title: Unable to write a single column to cloud spanner · Issue #3435 · googleapis/google-cloud-python
Description: Trying to write a single column value to cloud spanner raises an error saying mismatched number of columns and values: def run_txn(): from google.cloud import spanner spanner_client = spanner.Client() instance_id = 'your-instance' instan...
Open Graph Description: Trying to write a single column value to cloud spanner raises an error saying mismatched number of columns and values: def run_txn(): from google.cloud import spanner spanner_client = spanner.Clien...
X Description: Trying to write a single column value to cloud spanner raises an error saying mismatched number of columns and values: def run_txn(): from google.cloud import spanner spanner_client = spanner.Clien...
Opengraph URL: https://github.com/googleapis/google-cloud-python/issues/3435
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unable to write a single column to cloud spanner","articleBody":"Trying to write a single column value to cloud spanner raises an error saying mismatched number of columns and values:\r\n\r\n```python\r\ndef run_txn():\r\n from google.cloud import spanner\r\n spanner_client = spanner.Client()\r\n instance_id = 'your-instance'\r\n instance = spanner_client.instance(instance_id)\r\n database_id = 'example-db'\r\n database = instance.database(database_id)\r\n def f(t):\r\n t.insert_or_update(\r\n table=\"Singers\",\r\n columns=('SingerId'),\r\n values = [[6]])\r\n database.run_in_transaction(f)\r\n\r\nif __name__ == '__main__':\r\n run_txn()\r\n```\r\n\r\nThis raises the error:\r\n\r\n```python\r\n/usr/local/google/home/vikask/venvs/pythonq/local/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:335: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\r\n SNIMissingWarning\r\n/usr/local/google/home/vikask/venvs/pythonq/local/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:133: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\r\n InsecurePlatformWarning\r\nTraceback (most recent call last):\r\n File \"txn.py\", line 16, in \u003cmodule\u003e\r\n run_txn()\r\n File \"txn.py\", line 13, in run_txn\r\n database.run_in_transaction(f)\r\n File \"/usr/local/google/home/vikask/venvs/pythonq/local/lib/python2.7/site-packages/google/cloud/spanner/database.py\", line 379, in run_in_transaction\r\n return session.run_in_transaction(func, *args, **kw)\r\n File \"/usr/local/google/home/vikask/venvs/pythonq/local/lib/python2.7/site-packages/google/cloud/spanner/session.py\", line 311, in run_in_transaction\r\n _delay_until_retry(exc, deadline)\r\n File \"/usr/local/google/home/vikask/venvs/pythonq/local/lib/python2.7/site-packages/google/cloud/spanner/session.py\", line 309, in run_in_transaction\r\n txn.commit()\r\n File \"/usr/local/google/home/vikask/venvs/pythonq/local/lib/python2.7/site-packages/google/cloud/spanner/transaction.py\", line 114, in commit\r\n transaction_id=self._id, options=options)\r\n File \"/usr/local/google/home/vikask/venvs/pythonq/local/lib/python2.7/site-packages/google/cloud/gapic/spanner/v1/spanner_client.py\", line 832, in commit\r\n return self._commit(request, options)\r\n File \"/usr/local/google/home/vikask/venvs/pythonq/local/lib/python2.7/site-packages/google/gax/api_callable.py\", line 428, in inner\r\n return api_caller(api_call, this_settings, request)\r\n File \"/usr/local/google/home/vikask/venvs/pythonq/local/lib/python2.7/site-packages/google/gax/api_callable.py\", line 416, in base_caller\r\n return api_call(*args)\r\n File \"/usr/local/google/home/vikask/venvs/pythonq/local/lib/python2.7/site-packages/google/gax/api_callable.py\", line 376, in inner\r\n return a_func(*args, **kwargs)\r\n File \"/usr/local/google/home/vikask/venvs/pythonq/local/lib/python2.7/site-packages/google/gax/retry.py\", line 127, in inner\r\n ' classified as transient', exception)\r\ngoogle.gax.errors.RetryError: GaxError(Exception occurred in retry method that was not classified as transient, caused by \u003c_Rendezvous of RPC that terminated with (StatusCode.INVALID_ARGUMENT, Mutation has mismatched number of columns and values.)\u003e)\r\n```","author":{"url":"https://github.com/vkedia","@type":"Person","name":"vkedia"},"datePublished":"2017-05-17T19:06:07.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/3435/google-cloud-python/issues/3435"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a10960ba-c99e-44bb-9633-15a8b2fb6a3d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A7BC:1EF3D5:F38C61:145DACE:6A4D8561 |
| html-safe-nonce | 21580c9c2b1cdca89377dc42622bf125d4e92c3c404e14fbceee0fd7e9c775f9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBN0JDOjFFRjNENTpGMzhDNjE6MTQ1REFDRTo2QTREODU2MSIsInZpc2l0b3JfaWQiOiI0MjAzNDM3NDk4ODQ2NTEyNDgxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 6db7ffec3cb02c3173d2cc2daace3050cfba5212e94455872dbda99ba4229335 |
| hovercard-subject-tag | issue:229456869 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-python/3435/issue_layout |
| twitter:image | https://opengraph.githubassets.com/764cc7959b6b79e511efb9be788d33c91ecdcc858ed9cd29c77322bee962b142/googleapis/google-cloud-python/issues/3435 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/764cc7959b6b79e511efb9be788d33c91ecdcc858ed9cd29c77322bee962b142/googleapis/google-cloud-python/issues/3435 |
| og:image:alt | Trying to write a single column value to cloud spanner raises an error saying mismatched number of columns and values: def run_txn(): from google.cloud import spanner spanner_client = spanner.Clien... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vkedia |
| hostname | github.com |
| expected-hostname | github.com |
| None | c6bf61c909482ec3072ef5d7a5a28f2a9d214788c9a44793eca1960048cb05ae |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-python git https://github.com/googleapis/google-cloud-python.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 16316451 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 16316451 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6702a58b419a792226bd21ef0fb1bcb318bbcaa3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width