René's URL Explorer Experiment


Title: update back to null does not work for date or datetime · Issue #664 · datajoint/datajoint-python · GitHub

Open Graph Title: update back to null does not work for date or datetime · Issue #664 · datajoint/datajoint-python

X Title: update back to null does not work for date or datetime · Issue #664 · datajoint/datajoint-python

Description: schema = dj.schema('test_tables') @schema class Test(dj.Manual): definition = """ pk: int ---- date=null: date """ Test.insert1((2, '2019-09-25')) dj.Table._update(Test, 'date', None) gives the error: ------------------------------------...

Open Graph Description: schema = dj.schema('test_tables') @schema class Test(dj.Manual): definition = """ pk: int ---- date=null: date """ Test.insert1((2, '2019-09-25')) dj.Table._update(Test, 'date', None) gives the err...

X Description: schema = dj.schema('test_tables') @schema class Test(dj.Manual): definition = """ pk: int ---- date=null: date """ Test.insert1((2, '2019-09-25')) dj.T...

Opengraph URL: https://github.com/datajoint/datajoint-python/issues/664

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"update back to null does not work for date or datetime","articleBody":"```\r\nschema = dj.schema('test_tables')\r\n@schema\r\nclass Test(dj.Manual):\r\n    definition = \"\"\"\r\n    pk: int\r\n    ----\r\n    date=null: date\r\n    \"\"\"\r\n\r\nTest.insert1((2, '2019-09-25'))\r\ndj.Table._update(Test, 'date', None)\r\n ```\r\ngives the error:\r\n```\r\n---------------------------------------------------------------------------\r\nAttributeError                            Traceback (most recent call last)\r\n\u003cipython-input-33-b3f6114b7496\u003e in \u003cmodule\u003e\r\n----\u003e 1 dj.Table._update(test.Test \u0026 'pk=1', 'date', None)\r\n\r\nAttributeError: module 'test' has no attribute 'Test'\r\n\r\nIn [34]: dj.Table._update(Test \u0026 'pk=1', 'date', None)\r\n---------------------------------------------------------------------------\r\nTypeError                                 Traceback (most recent call last)\r\n\u003cipython-input-34-39bb5cd3e2c5\u003e in \u003cmodule\u003e\r\n----\u003e 1 dj.Table._update(Test \u0026 'pk=1', 'date', None)\r\n\r\n~/anaconda3/lib/python3.7/site-packages/datajoint/table.py in _update(self, attrname, value)\r\n    595             placeholder=placeholder,\r\n    596             where_clause=self.where_clause)\r\n--\u003e 597         self.connection.query(command, args=(value, ) if value is not None else ())\r\n    598\r\n    599\r\n\r\n~/anaconda3/lib/python3.7/site-packages/datajoint/connection.py in query(self, query, args, as_dict, suppress_warnings, reconnect)\r\n    206         cursor = self._conn.cursor(cursor=cursor_class)\r\n    207         try:\r\n--\u003e 208             self.__execute_query(cursor, query, args, cursor_class, suppress_warnings)\r\n    209         except errors.LostConnectionError:\r\n    210             if not reconnect:\r\n\r\n~/anaconda3/lib/python3.7/site-packages/datajoint/connection.py in __execute_query(cursor, query, args, cursor_class, suppress_warnings)\r\n    186                     # suppress all warnings arising from underlying SQL library\r\n    187                     warnings.simplefilter(\"ignore\")\r\n--\u003e 188                 cursor.execute(query, args)\r\n    189         except client_errors as err:\r\n    190             raise translate_query_error(err, query)\r\n\r\n~/anaconda3/lib/python3.7/site-packages/pymysql/cursors.py in execute(self, query, args)\r\n    166             pass\r\n    167\r\n--\u003e 168         query = self.mogrify(query, args)\r\n    169\r\n    170         result = self._query(query)\r\n\r\n~/anaconda3/lib/python3.7/site-packages/pymysql/cursors.py in mogrify(self, query, args)\r\n    145\r\n    146         if args is not None:\r\n--\u003e 147             query = query % self._escape_args(args, conn)\r\n    148\r\n    149         return query\r\n\r\nTypeError: not enough arguments for format string\r\n```\r\n\r\nInsert as an empty string gives:\r\n```\r\n---------------------------------------------------------------------------\r\nInternalError                             Traceback (most recent call last)\r\n\u003cipython-input-36-3407a586c925\u003e in \u003cmodule\u003e\r\n----\u003e 1 dj.Table._update(Test \u0026 'pk=1', 'date', '')\r\n\r\n~/anaconda3/lib/python3.7/site-packages/datajoint/table.py in _update(self, attrname, value)\r\n    595             placeholder=placeholder,\r\n    596             where_clause=self.where_clause)\r\n--\u003e 597         self.connection.query(command, args=(value, ) if value is not None else ())\r\n    598\r\n    599\r\n\r\n~/anaconda3/lib/python3.7/site-packages/datajoint/connection.py in query(self, query, args, as_dict, suppress_warnings, reconnect)\r\n    206         cursor = self._conn.cursor(cursor=cursor_class)\r\n    207         try:\r\n--\u003e 208             self.__execute_query(cursor, query, args, cursor_class, suppress_warnings)\r\n    209         except errors.LostConnectionError:\r\n    210             if not reconnect:\r\n\r\n~/anaconda3/lib/python3.7/site-packages/datajoint/connection.py in __execute_query(cursor, query, args, cursor_class, suppress_warnings)\r\n    188                 cursor.execute(query, args)\r\n    189         except client_errors as err:\r\n--\u003e 190             raise translate_query_error(err, query)\r\n    191\r\n    192     def query(self, query, args=(), *, as_dict=False, suppress_warnings=True, reconnect=None):\r\n\r\n~/anaconda3/lib/python3.7/site-packages/datajoint/connection.py in translate_query_error(client_error, query)\r\n     48     if isinstance(client_error, client.err.InternalError) and client_error.args[0] == 1364:\r\n     49         return errors.MissingAttributeError(*client_error.args[1:])\r\n---\u003e 50     raise client_error\r\n     51\r\n     52\r\n\r\n~/anaconda3/lib/python3.7/site-packages/datajoint/connection.py in __execute_query(cursor, query, args, cursor_class, suppress_warnings)\r\n    186                     # suppress all warnings arising from underlying SQL library\r\n    187                     warnings.simplefilter(\"ignore\")\r\n--\u003e 188                 cursor.execute(query, args)\r\n    189         except client_errors as err:\r\n    190             raise translate_query_error(err, query)\r\n\r\n~/anaconda3/lib/python3.7/site-packages/pymysql/cursors.py in execute(self, query, args)\r\n    168         query = self.mogrify(query, args)\r\n    169\r\n--\u003e 170         result = self._query(query)\r\n    171         self._executed = query\r\n    172         return result\r\n\r\n~/anaconda3/lib/python3.7/site-packages/pymysql/cursors.py in _query(self, q)\r\n    326         self._last_executed = q\r\n    327         self._clear_result()\r\n--\u003e 328         conn.query(q)\r\n    329         self._do_get_result()\r\n    330         return self.rowcount\r\n\r\n~/anaconda3/lib/python3.7/site-packages/pymysql/connections.py in query(self, sql, unbuffered)\r\n    515                 sql = sql.encode(self.encoding, 'surrogateescape')\r\n    516         self._execute_command(COMMAND.COM_QUERY, sql)\r\n--\u003e 517         self._affected_rows = self._read_query_result(unbuffered=unbuffered)\r\n    518         return self._affected_rows\r\n    519\r\n\r\n~/anaconda3/lib/python3.7/site-packages/pymysql/connections.py in _read_query_result(self, unbuffered)\r\n    730         else:\r\n    731             result = MySQLResult(self)\r\n--\u003e 732             result.read()\r\n    733         self._result = result\r\n    734         if result.server_status is not None:\r\n\r\n~/anaconda3/lib/python3.7/site-packages/pymysql/connections.py in read(self)\r\n   1073     def read(self):\r\n   1074         try:\r\n-\u003e 1075             first_packet = self.connection._read_packet()\r\n   1076\r\n   1077             if first_packet.is_ok_packet():\r\n\r\n~/anaconda3/lib/python3.7/site-packages/pymysql/connections.py in _read_packet(self, packet_type)\r\n    682\r\n    683         packet = packet_type(buff, self.encoding)\r\n--\u003e 684         packet.check_error()\r\n    685         return packet\r\n    686\r\n\r\n~/anaconda3/lib/python3.7/site-packages/pymysql/protocol.py in check_error(self)\r\n    218             errno = self.read_uint16()\r\n    219             if DEBUG: print(\"errno =\", errno)\r\n--\u003e 220             err.raise_mysql_exception(self._data)\r\n    221\r\n    222     def dump(self):\r\n\r\n~/anaconda3/lib/python3.7/site-packages/pymysql/err.py in raise_mysql_exception(data)\r\n    107         errval = data[3:].decode('utf-8', 'replace')\r\n    108     errorclass = error_map.get(errno, InternalError)\r\n--\u003e 109     raise errorclass(errno, errval)\r\n\r\nInternalError: (1292, \"Incorrect date value: '' for column `test_tables`.`test`.`date` at row 1\")\r\n```","author":{"url":"https://github.com/shenshan","@type":"Person","name":"shenshan"},"datePublished":"2019-09-26T18:54:40.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/664/datajoint-python/issues/664"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:2c3096cd-d364-fd89-7be0-a92a6884e275
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBE78:CD887:35EAC01:4A56E9D:6A4F3256
html-safe-nonce14c15d06ddbc92b4ab9b1ec1a8586c51c7142b4c6a29246a57c71d812c860edb
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRTc4OkNEODg3OjM1RUFDMDE6NEE1NkU5RDo2QTRGMzI1NiIsInZpc2l0b3JfaWQiOiIxNTgwNTE4NzgyNDA4Nzk4ODA2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac7af4049889515c518b5fce9118a5d139ba9a4e87f01dea67787d4287903327e3
hovercard-subject-tagissue:499058120
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/datajoint/datajoint-python/664/issue_layout
twitter:imagehttps://opengraph.githubassets.com/b8e12a239c9819f818db995700e16398a92b9fabffbbb39df4df3213deacfd39/datajoint/datajoint-python/issues/664
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b8e12a239c9819f818db995700e16398a92b9fabffbbb39df4df3213deacfd39/datajoint/datajoint-python/issues/664
og:image:altschema = dj.schema('test_tables') @schema class Test(dj.Manual): definition = """ pk: int ---- date=null: date """ Test.insert1((2, '2019-09-25')) dj.Table._update(Test, 'date', None) gives the err...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameshenshan
hostnamegithub.com
expected-hostnamegithub.com
Noneb92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9
turbo-cache-controlno-preview
go-importgithub.com/datajoint/datajoint-python git https://github.com/datajoint/datajoint-python.git
octolytics-dimension-user_id2375501
octolytics-dimension-user_logindatajoint
octolytics-dimension-repository_id5866704
octolytics-dimension-repository_nwodatajoint/datajoint-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id5866704
octolytics-dimension-repository_network_root_nwodatajoint/datajoint-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2b8f23afb982271f1b22258a94aede67a6b77760
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/datajoint/datajoint-python/issues/664#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdatajoint%2Fdatajoint-python%2Fissues%2F664
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdatajoint%2Fdatajoint-python%2Fissues%2F664
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=datajoint%2Fdatajoint-python
Reloadhttps://github.com/datajoint/datajoint-python/issues/664
Reloadhttps://github.com/datajoint/datajoint-python/issues/664
Reloadhttps://github.com/datajoint/datajoint-python/issues/664
Please reload this pagehttps://github.com/datajoint/datajoint-python/issues/664
datajoint https://github.com/datajoint
datajoint-pythonhttps://github.com/datajoint/datajoint-python
Notifications https://github.com/login?return_to=%2Fdatajoint%2Fdatajoint-python
Fork 96 https://github.com/login?return_to=%2Fdatajoint%2Fdatajoint-python
Star 194 https://github.com/login?return_to=%2Fdatajoint%2Fdatajoint-python
Code https://github.com/datajoint/datajoint-python
Issues 8 https://github.com/datajoint/datajoint-python/issues
Pull requests 4 https://github.com/datajoint/datajoint-python/pulls
Discussions https://github.com/datajoint/datajoint-python/discussions
Actions https://github.com/datajoint/datajoint-python/actions
Security and quality 0 https://github.com/datajoint/datajoint-python/security
Insights https://github.com/datajoint/datajoint-python/pulse
Code https://github.com/datajoint/datajoint-python
Issues https://github.com/datajoint/datajoint-python/issues
Pull requests https://github.com/datajoint/datajoint-python/pulls
Discussions https://github.com/datajoint/datajoint-python/discussions
Actions https://github.com/datajoint/datajoint-python/actions
Security and quality https://github.com/datajoint/datajoint-python/security
Insights https://github.com/datajoint/datajoint-python/pulse
#760https://github.com/datajoint/datajoint-python/pull/760
update back to null does not work for date or datetimehttps://github.com/datajoint/datajoint-python/issues/664#top
#760https://github.com/datajoint/datajoint-python/pull/760
https://github.com/dimitri-yatsenko
Release 0.12.6https://github.com/datajoint/datajoint-python/milestone/14
https://github.com/shenshan
shenshanhttps://github.com/shenshan
on Sep 26, 2019https://github.com/datajoint/datajoint-python/issues/664#issue-499058120
dimitri-yatsenkohttps://github.com/dimitri-yatsenko
Release 0.12.6https://github.com/datajoint/datajoint-python/milestone/14
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.