IMPORTXHTML giving could not fetch url error from nasdaq in Sheets - xpath

I'm trying to get data from the row open interest to appear in my Google Sheets. I have tried both IMPORTHTML and IMPORTXML, but I keep getting the could not fetch url error. Here is the current code I am working with.
=IMPORTXML(CONCATENATE("https://www.nasdaq.com/market-activity/funds-and-etfs/spy/option-chain/call-put-options/spy---201224c00370000"),"//tr[text()='Open Interest']/td")
When I inspected the table every row has the same class, so I can't select by class, same goes for header. So I'm not sure how to access the line once the URL can be fetched
I have tried http: and https:, that's not it.

Related

Supabase file uploading occasionally fails

Sometimes I can upload a file and sometimes I get this error:
{statusCode: '403', error: '', message: 'new row violates row-level security policy (USING expression) for table "objects"'}
I got the uploading code from this page. I duplicated the component with different bucket names and only changed htmlFor, id, accept and bucket url, both with the same policies but sometimes the other works/fails or both. One is for image upload and the other video, both have worked at some point so idk why I keep getting the error. And none of the files exceeds the max upload size(50mb). Heres SQL snippet I used:
insert into storage.buckets (id, name)
values ('avatars', 'avatars');
create policy "Avatar images are publicly accessible." on storage.objects
for select using (bucket_id = 'avatars');
create policy "Anyone can upload an avatar." on storage.objects
for insert with check (bucket_id = 'avatars');
Also I'm using Typescript and no error in my code.

Why does Multiple media field returns same image?

I am working on a sample blog web app using Gatsby and Strapi. To test the multiple-media capability:
I created a test dataset, where the Collection Type definition was a single "Name" field and a field for multiple media.
name: Text, images: List[Media]
Then, I created few entries, expecting to use the following graphql query to retrive the data from strapi: query
However, the publicURL property for each returned row is the same image url - the first uploaded image. As a result, the web app displays the same image for all three records.
Based on posts online, I suspected it might be a cache issue and tried gatsby clean multiple times and gatsby develop. However, the images are still getting mixed up.
I'm stuck on identifying why this might be happening. Does anyone have any thoughts on what could be the problem? I'd appreciate the insight.
Do not pull formats just get full lists as an object.
Modify your GraphQL query then handle lists inside gatsby.
console.log(typeof(lists))

Microsoft Access unable to display image attachment (Runtime Error 2220)

I have a table called "Subsidiary Companies" where I store the names of different subsidiary companies and their corresponding company logo images as an attachment in a table.
I have a form called "invoice" where I use it to generate invoices. Whenever I select a subsidiary from a Combobox, it will change the image attachment box on my form to the one corresponding to the company selected.
After I attach the image to the table it worked. When I closed my entire access program and went back to it, it doesn't work anymore even though I did not change any codes, settings or image path. I got an error instead, "Runtime Error 2220: Microsoft Access can't open the file image.jpeg".
Here is my code to select the attachment image based on the company selected:
Me.AttachmentCompanyLogo.DefaultPicture = Me.ComboboxCompanySelection.Column(1)
Not sure where it went wrong as I am not very familiar with Access, would appreciate some help, thank you :)
based on this statement: " When I closed my entire access program and went back to it, it doesn't work anymore"
that behavior would occur if you failed to also include the primary/foreign key cross reference value in the record. such that when you next go to select it - it can't be found because when you added the image/path it also needed the key value as a cross reference...
this is just a guess of course...
look directly at the table and see if this data is missing...
on a different topic; if you have only a small quantity of images the use of attachments is ok however if there will be a larger quantity then one should not use the attachments feature and instead store the image docs in a separate folder while putting the path to the image doc in a table.

Refresh filters when new data comes in

I have a Google Spreadsheet with multiple sheets. We paste a table of data into sheet1 and all the other sheets have filters based basically on the 'membernumber' value in one of the columns (so that the mass data that gets imported gets sorted by our individual members). We then want to send an email with an updated table for each individual member (so therefore my script will access each individual sheet and copy the filtered table of data to the email message body).
But my question is for one of the early parts of this script: How can I make my Apps Script automatically refresh the filters in all of our sheets after we've imported the new data in sheet1? Right now we go manually and click the filter icon and re-select the member's number, or 0 if they don't have data for that day. It's killing me.
I know apps script doesn't have an AutoFilter method, but maybe with the Sheet API I can refresh them? I think this may be the method I need to call.
Let's say I have a sheet, would I just write:
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("example");
sheet.updateFilterView({"fields": *}); //since I want to update all filters, all fields on each sheet
I really wish the Google sheets API had some examples!

turbogears querying the database for file

I am using the Turbogears-2.3 framework and now I know how to upload the files in the database using the tgext.datahelpers. I understand that the file gets uploaded in the disk and in the database the metadata gets stored in the JSON format. Now I want to query the database and wanted that the link to get generated in the file collumn so if someone clicks on it then the file can get downloaded. However when I tried to query the database and viewed the table, in the file column I get text like trai.model.model.F_AttachedFile object at 0xa7325bac (trai is the name of the project).
When I iterated through the table and printed the value of the element in the javascript console, the same thing is getting printed. Could anyone please tell me how to generate the downloadable link from this.
Thank you very much
Not sure that I full understood your question, a little snippet of code might have helped understanding the context, but if I guessed correctly you are trying to the the url of a tgext.datahelpers uploaded file.
In such case see https://bitbucket.org/axant/tgext.datahelpers#rst-header-attachments each attachment Column provides an url property, so you can get the URL from there.
There is also an example that saves and Document model with a file field and queries it back printing the url.

Resources