WordPress database error: [<div style="clear:both"> </div><div class="queries" style="clear:both; margin_bottom:2px; border: red dotted thin;">Queries made or created this session were<br/>
<ol>
<li>Raw query:
SELECT * FROM wp_options WHERE </li>
<li>Rewritten:
SELECT * FROM wp_options WHERE </li>
<li>With Placeholders:
SELECT * FROM wp_options WHERE </li>
<li>Prepare:
SELECT * FROM wp_options WHERE </li>
</ol>
</div><div style="clear:both; margin_bottom:2px; border: red dotted thin;" class="error_message" style="border-bottom:dotted blue thin;">Error occurred at line 1644 in Function prepare_query. <br/> Error message was: Problem preparing the PDO SQL Statement. Error was: SQLSTATE[HY000]: General error: 1 incomplete input </div><pre>#0 /home/nattaylor/public_html/wordpress/wp-content/db.php(2746): WP_SQLite_DB\PDOEngine->get_error_message()
#1 /home/nattaylor/public_html/wordpress/wp-content/db.php(3484): WP_SQLite_DB\wpsqlitedb->query('...')
#2 /home/nattaylor/public_html/wordpress/wp-content/db.php(2952): WP_SQLite_DB\PDOSQLiteDriver->execute_duplicate_key_update()
#3 /home/nattaylor/public_html/wordpress/wp-content/db.php(1893): WP_SQLite_DB\PDOSQLiteDriver->rewrite_query('...', '...')
#4 /home/nattaylor/public_html/wordpress/wp-content/db.php(1357): WP_SQLite_DB\PDOEngine->execute_insert_query_new('...')
#5 /home/nattaylor/public_html/wordpress/wp-content/db.php(2739): WP_SQLite_DB\PDOEngine->query('...')
#6 /home/nattaylor/public_html/wordpress/wp-includes/option.php(1143): WP_SQLite_DB\wpsqlitedb->query('...')
#7 /home/nattaylor/public_html/wordpress/wp-includes/option.php(2189): add_option('...', 1765311931, '', '...')
#8 /home/nattaylor/public_html/wordpress/wp-includes/option.php(1953): add_network_option(1, '...', 1765311931)
#9 /home/nattaylor/public_html/wordpress/wp-includes/option.php(2680): add_site_option('...', 1765311931)
#10 /home/nattaylor/public_html/wordpress/wp-includes/class-wp-theme.php(2047): set_site_transient('...', Array, 1800)
#11 /home/nattaylor/public_html/wordpress/wp-includes/class-wp-theme.php(1856): WP_Theme->set_pattern_cache(Array)
#12 /home/nattaylor/public_html/wordpress/wp-includes/block-patterns.php(374): WP_Theme->get_block_patterns()
#13 /home/nattaylor/public_html/wordpress/wp-includes/class-wp-hook.php(341): _register_theme_block_patterns('')
#14 /home/nattaylor/public_html/wordpress/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array)
#15 /home/nattaylor/public_html/wordpress/wp-includes/plugin.php(522): WP_Hook->do_action(Array)
#16 /home/nattaylor/public_html/wordpress/wp-settings.php(742): do_action('...')
#17 /home/nattaylor/public_html/wordpress/wp-config.php(84): require_once('...')
#18 /home/nattaylor/public_html/wordpress/wp-load.php(50): require_once('...')
#19 /home/nattaylor/public_html/wordpress/wp-blog-header.php(13): require_once('...')
#20 /home/nattaylor/public_html/wordpress/index.php(17): require('...')
</pre>] SELECT * FROM wp_options WHERE
WordPress database error: [<div style="clear:both"> </div><div class="queries" style="clear:both; margin_bottom:2px; border: red dotted thin;">Queries made or created this session were<br/>
<ol>
<li>Raw query:
SELECT * FROM wp_options WHERE </li>
<li>Rewritten:
SELECT * FROM wp_options WHERE </li>
<li>With Placeholders:
SELECT * FROM wp_options WHERE </li>
<li>Prepare:
SELECT * FROM wp_options WHERE </li>
</ol>
</div><div style="clear:both; margin_bottom:2px; border: red dotted thin;" class="error_message" style="border-bottom:dotted blue thin;">Error occurred at line 1644 in Function prepare_query. <br/> Error message was: Problem preparing the PDO SQL Statement. Error was: SQLSTATE[HY000]: General error: 1 incomplete input </div><pre>#0 /home/nattaylor/public_html/wordpress/wp-content/db.php(2746): WP_SQLite_DB\PDOEngine->get_error_message()
#1 /home/nattaylor/public_html/wordpress/wp-content/db.php(3484): WP_SQLite_DB\wpsqlitedb->query('...')
#2 /home/nattaylor/public_html/wordpress/wp-content/db.php(2952): WP_SQLite_DB\PDOSQLiteDriver->execute_duplicate_key_update()
#3 /home/nattaylor/public_html/wordpress/wp-content/db.php(1893): WP_SQLite_DB\PDOSQLiteDriver->rewrite_query('...', '...')
#4 /home/nattaylor/public_html/wordpress/wp-content/db.php(1357): WP_SQLite_DB\PDOEngine->execute_insert_query_new('...')
#5 /home/nattaylor/public_html/wordpress/wp-content/db.php(2739): WP_SQLite_DB\PDOEngine->query('...')
#6 /home/nattaylor/public_html/wordpress/wp-includes/option.php(1143): WP_SQLite_DB\wpsqlitedb->query('...')
#7 /home/nattaylor/public_html/wordpress/wp-includes/option.php(2189): add_option('...', Array, '', '...')
#8 /home/nattaylor/public_html/wordpress/wp-includes/option.php(1953): add_network_option(1, '...', Array)
#9 /home/nattaylor/public_html/wordpress/wp-includes/option.php(2682): add_site_option('...', Array)
#10 /home/nattaylor/public_html/wordpress/wp-includes/class-wp-theme.php(2047): set_site_transient('...', Array, 1800)
#11 /home/nattaylor/public_html/wordpress/wp-includes/class-wp-theme.php(1856): WP_Theme->set_pattern_cache(Array)
#12 /home/nattaylor/public_html/wordpress/wp-includes/block-patterns.php(374): WP_Theme->get_block_patterns()
#13 /home/nattaylor/public_html/wordpress/wp-includes/class-wp-hook.php(341): _register_theme_block_patterns('')
#14 /home/nattaylor/public_html/wordpress/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array)
#15 /home/nattaylor/public_html/wordpress/wp-includes/plugin.php(522): WP_Hook->do_action(Array)
#16 /home/nattaylor/public_html/wordpress/wp-settings.php(742): do_action('...')
#17 /home/nattaylor/public_html/wordpress/wp-config.php(84): require_once('...')
#18 /home/nattaylor/public_html/wordpress/wp-load.php(50): require_once('...')
#19 /home/nattaylor/public_html/wordpress/wp-blog-header.php(13): require_once('...')
#20 /home/nattaylor/public_html/wordpress/index.php(17): require('...')
</pre>] SELECT * FROM wp_options WHERE
Working with a Trumba Calendar by Nat Taylor
Nat Taylor — Blog, AI, Product Management & Tinkering
Working with a Trumba Calendar
Published on .
Recently I got fed up with my YMCA’s calendar due to all the stuff they overlay on it. They use Trumba (Trumba offers web-hosted event calendar software for publishing online, interactive, calendars of events) who it turns out have a pretty nice API.
The trick is getting the calendar’s “webName” which I get from searching sources in DevTools, then the URL is as simple as https://www.trumba.com/calendars/northshore-ymca.json?startdate=20221206&days=7 (and they also support other formats.)
I only wanted events for one location and certain event titles, so I added a bit for that.
"""Get calendar info for the Northshore YMCA
@see https://www.trumba.com/help/api/customfeedurls.aspx"""import requests
import datetime
import dataclasses
@dataclasses.dataclassclassEvent:
title: str = None
start: datetime.datetime = None
end: datetime.datetime = None
permaLinkUrl: str = None
signUpUrl: str = Nonedef__init__(self, **kwargs):
self.title = kwargs.get('title')
self.start = datetime.datetime.fromisoformat(kwargs.get('startDateTime'))
self.end = datetime.datetime.fromisoformat(kwargs.get('endDateTime'))
self.permaLinkUrl = kwargs.get('permaLinkUrl')
if'signUpUrl'in kwargs:
self.signUpUrl = kwargs.get('signUpUrl')
deftime(self, bound):if bound=='day':
return self.start.strftime('%a')
return getattr(self, bound).strftime('%I:%M%p').lstrip('0')
today = datetime.datetime.now().strftime('%Y%m%d')
# _1568936_ is for the Marblehead YMCA
r = requests.get(f"https://www.trumba.com/calendars/northshore-ymca.json?startdate={today}&days=7&previousweeks=0&filter3=_1568936_").json()
events_of_interest = [
'Open Swim - Small Pool',
'Toddler Open Gymnastics',
'Bounce House',
'Kids Club',
'Open Swim in Small Pool',
'Toddler and Me Yoga',
]
for i, e in enumerate(r):
ev = Event(**e)
if any([t in ev.title for t in events_of_interest]) and'Adult Open Swim'notin ev.title:
if ev.signUpUrl:
title = f"<a href={ev.signUpUrl}>{ev.title}</a>"else:
title = ev.title
print("<li>{day} {start}-{end} {title}</li>".format(title = title, start=ev.time('start'), end=ev.time('end'), day=ev.time('day')))