octopart / api-excel-add-in

GNU General Public License v3.0
11 stars 2 forks source link

ERROR: Fatal error #4

Open HiFiPhile opened 3 years ago

HiFiPhile commented 3 years ago

Hi,

With Excel 365 I can't get work correctly.

Firstly I added=@OCTOPART_SET_APIKEY("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx") , it says Octopart Add-In is ready! Then I tried a simple query: =@OCTOPART_DISTRIBUTOR_STOCK("STPM33TR") which gave me:

ERROR: Fatal error. Please email 'contact@octopart.com' with details (data is not of correct type)
t-monti commented 3 years ago

Same error for me on Office Professional Plus 2019.

I wrote to the 'contact@octopart.com', reporting all the data that I thought useful, including the fact that I had downloaded the latest version from github. They asked me if I installed the latest version of the add-in.... !?

Daniel-Probent commented 3 years ago

Hi,

same error for you, Same error for me on Office Professional Plus 206.

I do have the Api keys provided by Octopart, I enter =OCTOPART_SET_APIKEY ("key api") and the price or other search for components does not work.

I used the add-in provided GitHub OctopartXll-AddIn-packed, in 32-bit version because I have a 32bit version but alas with each query I have ERROR: Fatal error. Please email "contact@octopart.com with details (data is not of correct type).

Please help.

thank you.

best regard's

t-monti commented 3 years ago

I made a little progress. If the query contain a real component part number (SKU), I got the previously error. If the SKU is an unexists P/N like "xyzyxyzyxy"; the Add-In return a message like "ERROR: Query did not provide a result. Please widen your search criteria.".

Daniel-Probent commented 3 years ago

Hi t-monti,

If you find me the solution, frankly you're too strong

Thank you,

Best regard’s

[PROBENT TECHNOLOGY] Daniel De Freitas Responsable Département Electronique — Campus Innovaparc 2 rue Jean Perrin 14460 Colombelles T 02 31 35 10 02 M 06 45 88 08 17 FAIRE PREUVE | WWW.PROBENT.COMhttp://www.probent.com/

De : t-monti @.> Envoyé : mardi 30 mars 2021 17:57 À : octopart/api-excel-add-in @.> Cc : Daniel DE FREITAS @.>; Comment @.> Objet : Re: [octopart/api-excel-add-in] ERROR: Fatal error (#4)

I made a little progress. If the query contain a real component part number (SKU), I got the previously error. If the SKU is an unexists P/N like "xyzyxyzyxy"; the Add-In return a message like "unable to find component. widen the search".

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/octopart/api-excel-add-in/issues/4#issuecomment-810380292, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATOLVL2VTDRDIRYEU3PAXULTGHYFHANCNFSM4ZZUKDRA.

mgre44 commented 3 years ago

Hi, i have Excel 2016 Pro Plus and i'm now facing the same problem you all are experiencing.

The problem is that i was using this add-in for an entire morning without any issue and then it suddenly started to behave like this. I don't think it's related but it happened after i reached and surpasse by few P/N the 500 query limit. After that even after upgrading my plan i started having issues.

ShaQ68 commented 3 years ago

Hi, I have Excel 2010 and the same problem. Finally, I've found a function that returns a result (different from fatal error). It is "=OCTOPART_GET_INFO()" The function returns a "Version: 2.0.0.18908". After I attempted to contact Octopart they sent me here.

t-monti commented 3 years ago

Hi to all. Unfortunately I can't get support even by contacting octopart. They told me that official support has ended and therefore I assume we won't have a solution. As you can see, no technician answered here. I'm sorry because our company has been an Altium customer for a long time and I would have expected a better support. We have therefore decided to proceed with other solutions. It's incomprehensible.

Daniel-Probent commented 3 years ago

Hi T-monti, very thank you for this support!! I'm shocked, I don't understand that Octopart stops this Excel Add-In , which to charge it I don't understand

Daniel

CyberCityCircuits commented 3 years ago

@t-monti It seems that Octopart is no longer managing a Excel AddIn, but the wonderful opensource community is. Fear not, I believe it shall work again.

Daniel-Probent commented 3 years ago

Hi T-monti, Yes I hope, it would be great to be able to operate the addin on excel thank you

heming18 commented 3 years ago

Here's what I can found, it maybe not correct: 1, The excel add-in only support following windows OS: Win8 32-bit / Excel 2010 32-bit WinXP 32-bit / Excel 2010 32-bit Win7 32-bit / Excel 2010 32-bit Win7 32-bit / Excel 2013 32-bit Win7 64-bit / Excel 2013 64-bit So we need to find a win8 32-bit machine.

2, The excel add-in don't need APIKEY, the APIKEY is for REST query.

3, I try the APIKEY to REST query, it says "invalid apikey". Seems it's not activated yet.

4, Please also consider win8 OS firewall. It maybe block excel.

Solution 1: Win8 32-bit / Excel 2010 32-bit, enable 32bit add-in, no need apikey. Just need =OCTOPART_SET_USER("email").

Solution 2: Contact octopart tor validate our APIKEY.

:)

vivienwwp commented 3 years ago

Hello! Has there been any solutions since? Octopart support point me to this link. I am having exactly the same issue on Excel 365 64 bit. It says Octopart Add-In is ready! but gives me error: ERROR: Fatal error. Please email 'contact@octopart.com' with details (data is not of correct type)

ripperus commented 3 years ago

Hi As you can see inside the code Excel Add-In is using REST wrapper on APIv4, with OCTOPART_URL_BASE https://octopart.com/api/v4/rest and OCTOPART_URL_PART_MATCH_ENDPOINT parts/match. Query code from Excel looks like:

// Query octopart.com var client = new RestClient(OCTOPART_URL_BASE); var req = new RestRequest(OCTOPART_URL_PART_MATCH_ENDPOINT, Method.GET) .AddParameter("apikey", apiKey) .AddParameter("queries", queryString) .AddParameter("include[]", "datasheets"); **Pricing and availability data is included by default** but all other types of data must be added to the request. That's why there is additional parameter "include[]", "datasheets" to make Excel formula =OCTOPART_DATASHEET_URL working. So If you are using Api key for Distributors (without Prices and Stock availability) this Excel Add In will not work. Also if you have Basic plan which do not contain access to Datasheets will also not work.
Elijan9 commented 3 years ago

Pricing and availability data is included by default but all other types of data must be added to the request. That's why there is additional parameter "include[]", "datasheets" to make Excel formula =OCTOPART_DATASHEET_URL working. So If you are using Api key for Distributors (without Prices and Stock availability) this Excel Add In will not work.

I've been busy trying to fix this for my colleagues and came to the same conclusion some hours ago. I fixed it by removing the "include[]" parameter and it doesn't seem to have any side effect (we're not using the "OCTOPART_DATASHEET_URL" function). I pushed a fix. Only now I'm reading your comment.

Rather than fixing the add-in it would be best if Octopart fixed this in the API by simply ignoring the include[]=datasheets parameter and give a valid response.

vivienwwp commented 3 years ago

Hi,

Thanks for trying to fix up. I am however still having issues with all of Octoparts API functions. The only one that seemed to work is =@OCTOPART_GET_INFO()

All of these don't work for me: =OCTOPART_AVERAGE_PRICE() =OCTOPART_DISTRIBUTOR_STOCK() =OCTOPART_DISTRIBUTOR_PRICE()

The API key that I purchased is the $20/mo Basic which should give me access to these functions.

Elijan9 commented 3 years ago

We're using mainly: =OCTOPART_DISTRIBUTOR_STOCK() =OCTOPART_DISTRIBUTOR_PRICE()

These seem to work for us now when using the patch I applied to my fork. Please note my patch isn't approved/applied to this tree yet. (If you're using my fork, it's probably better to report any issue there.)

Hopefully Octopart will update their API and silently ignore the "include[]" parameter for non-pro customers so we won't need this fix.

vivienwwp commented 3 years ago

I forgot to mention that I am not using the API directly but I am using the Excel Add-in. How do I apply your patch for Excel Add-in? Do you mean that if I were to purchase the Pro API, these functions will work ?

Thank you

Elijan9 commented 3 years ago

How do I apply your patch for Excel Add-in?

You can grab my precompiled addins at https://github.com/Elijan9/api-excel-add-in or compile my fork yourself. (I would always recommend to build it yourself if you can.)

Do you mean that if I were to purchase the Pro API, these functions will work ?

Probably yes, that's why it appears this plugin is working for some people.

vivienwwp commented 3 years ago

Thanks!! Your new Excel add-in works for me now!

Daniel-Probent commented 3 years ago

Excellent for me also it works, thanks again.

the only problem is that I can't get a price with FARNELL

baasjeboot commented 3 years ago

I had the same problem with pricing from Farnell. The issue is that the response from octopart is in GBP or great british pounds.

In excel if you fill in GBP as currency you get the price from octopart. With the daily exchange rate you can calculate it back to dollars.

RobAltium commented 3 years ago

Thanks to @HiFiPhile for raising this issue originally, to @Elijan9 for providing a link to his cloned version, and to everyone who contributed to the discussion. I wanted to share with you "early adopters" that there is a new Excel Add-in available from Altium today which might be useful to you! This Add-in is closely related to the open-sourced Octopart Add-in but it uses a GraphQL API under the hood and not the older RESTful service.

https://github.com/NexarDeveloper/nexar-supply-excel-cs

Rather than using an Octopart API token, in order to run queries you'll have to sign up at Altium's "Nexar.com" website and create a "supply domain application". This will provide you with a client "Id" and "secret" (string "Guids", a bit like the API token) which you can use to login to Nexar from within the new Add-in. See the README. Creating a supply client is free and gives you access to 500 part searches per month (like a free Octopart API account).

I strongly believe Nexar will be big. It's a developer platform to support the electronics ecosystem with three domains: Design (Altium Designer/A365), Manufacture (various partners and in-house services) and Supply (Octopart). If you're an Altium Live customer today you can simply use that account to sign in to Nexar.com. Otherwise you can create an account with just your name and email. Nexar is brand new and its Supply domain is in beta right now and we'd love your feedback.

When you sign up at Nexar.com, you'll receive an email from our Director of API Commercial Strategy, Alex Sapp. He would be a good person to speak to if you find you need more than the free 500 parts/month. You can also give feedback via Alex or, since the NexarDeveloper repository is accessible, feel free to raise a GitHub issue there. I'll keep an eye out for such things. Enjoy!

fredyvelez01 commented 3 years ago

@RobAltium @Elijan9 , en estos momentos estoy pagando el plan básico 20k y no me deja utilizar la versión add in, ni la primera, ni la clonada por el compañero @Elijan9.

@RobAltium, si necesito consultar mas de 500 veces, como puedo hacerlo con Nexar, ya que lo que ofrecen hoy es solo hasta 500

RobAltium commented 3 years ago

Gracias @fredyvelez01 ... here is, I think, the English translation...

At the moment I am paying for the basic 20k plan and it does not let me use the complementary version, nor the first, nor the one cloned by the partner.

If I need to consult more than 500 times, how can I do it with Nexar, since what they offer today is only up to 500.

We can support you. When you register with Nexar (for free) you will receive an email from our API Director (Alex Sapp). Please contact Alex with your request, explaining that you are an existing Octopart customer on the 20k basic plan. Once you are happy with the Nexar Excel add-in, he may be able to adjust your Nexar limits. Altium want to help customers transition smoothly.