partkeepr / PartKeepr

Open Source Inventory Management
http://www.partkeepr.org
GNU General Public License v3.0
1.38k stars 400 forks source link

Octopart feature doesn't work #1146

Closed kgabryszewska closed 4 years ago

kgabryszewska commented 4 years ago

Bug description

When I'm adding New Component to the database and try to download part parameters from Octopart, I see only white page, without any records. This also stopped working for your Demo version on your website.

Steps to reproduce

  1. Add New Component
  2. Add name f.eg MCP4652
  3. Click Octopart button
  4. See white page without any records

Expected behavior

It should work as before. Records with MPN's from Octopart should be showed and I should be able to import them to my database.

Observed behavior

White page.

Screenshots and files

bug#2 bug#1

System Information

JavaScript errors

To get the log see here.

JavaScript logs ``` Failed to load resource: the server https://10.65.212.105/api/octopart/query/?q=MCP4652&_dc=1596017796957&page=1 responded with a status of 500 (Internal Server Error) ```
Gasman2014 commented 4 years ago

Octopart used to offer a free API to access this information but this facility was removed a couple of years ago. You can still use the facility on your own PartKeepr setup BUT you will have to sign up to a paid package from Octopart in order to get a valid API token. I think they have plans which start from $25pm or so. I presume that the original author has not maintained the Octopart access ( I am not sure that it was ever active on the demo site in any case).

Recently, Octopart have announced a new, limited but free API. Unfortunately this is not the same as the original API so if you want to use this, the code will have to be rewritten to parse the information. I believe the new API does not allow downloading data sheets and is also restricted in other ways compared to the paid for product. There are some other licensing issues about retention of data which might make this problematic too.

On 29 Jul 2020, at 11:17, kgabryszewska notifications@github.com wrote:

Bug description

When I'm adding New Component to the database and try to download part parameters from Octopart, I see only white page, without any records. This also stopped working for your Demo version on your website.

Steps to reproduce

Add New Component Add name f.eg MCP4652 Click Octopart button See white page without any records Expected behavior

It should work as before. Records with MPN's from Octopart should be showed and I should be able to import them to my database.

Observed behavior

White page.

Screenshots and files

https://user-images.githubusercontent.com/68948701/88788168-3fdcf900-d195-11ea-9f67-4dd4a87f9ca1.JPG https://user-images.githubusercontent.com/68948701/88788172-40758f80-d195-11ea-9ee8-75b447bc79e0.JPG System Information

PartKeepr Version: 1.4.0 Operating System: Debian GNU/Linux 9.13 (stretch) Web Server: Doctrine\Common\Cache\ApcCache PHP Version: 7.0.33-0+deb9u8 Database and version: Reproducible on the demo system: Yes JavaScript errors

To get the log see here http://wiki.partkeepr.org/wiki/Issues/Opening_the_JavaScript_Console.

JavaScript logs — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/partkeepr/PartKeepr/issues/1146, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACADFOJAF3ADU6LRJ7UQLEDR57ZLPANCNFSM4PLOBEPA.

christianlupus commented 4 years ago

To debug this a bit further, I suggest you look into the logs of your webserver. There should be some hint in the logs. Most probably you get a not authorized message from Octopart. Can you please check this?

Plinsboorg commented 4 years ago

According to issue #1125 we have free opportunity to use Octopart API. In my opinion, it is critical feature to have. Octopart integration is one of the main reasons why I chose PartKeepr from other existing inventory managers available. I'm afraid I disagree with tag "Will be closed soon". This feature needs to be developed and it won't necessarily be easy.

Gasman2014 commented 4 years ago

Although the new Octopart API offers free (limited) access, it is not the same API as the paid for version - so a new parser would be needed to use this. Also, the new free API is also rather more limited - for instance, I don’t think you can download datasheets - it isn’t simply a limit on the number of queries allowed.

On 6 Aug 2020, at 07:13, Denis notifications@github.com wrote:

According to issue #1125 https://github.com/partkeepr/PartKeepr/issues/1125 we have free opportunity to use Octopart API. In my opinion, it is critical feature to have. Octopart integration is one of the main reasons why I chose PartKeepr from other existing inventory managers available. I'm afraid I disagree with tag "Will be closed soon". This feature needs to be developed and it won't necessarily be easy.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/partkeepr/PartKeepr/issues/1146#issuecomment-669724758, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACADFOMKBCS3QEL3QQNN7ZDR7JC2PANCNFSM4PLOBEPA.

christianlupus commented 4 years ago

@Plinsboorg I added the "Will be closed soon" as this will activate the stale bot of github. Without further insight, I cannot do much as I have not enough information to know if the issue is the Octopart API restriction (most probably) or not.

If it is the Octopart restriction, we cannot do anything right now. I confirm, that it might be well the case that the new API might allow us to use this aspect of PartKeepr in future. But as @Gasman2014 already noted there is no guarantee that the new interface is mighty enough to be used in our favor. Additionally, it is to my understanding not yet available for the broad public (I might have to recheck however).

If the issue is due to some internal PK bug, I will happily remove the tag of course.

What would be a very valid and useful feature request was a more verbose message for the user to understand why "nothing" is happening obviously.

Gasman2014 commented 4 years ago

I think the point is that the current full octopart setup still works. It is just that the access is no longer free.

John Pateman

Sent from my iPhone

On 7 Aug 2020, at 11:33, Christian notifications@github.com wrote:

 @Plinsboorg I added the "Will be closed soon" as this will activate the stale bot of github. Without further insight, I cannot do much as I have not enough information to know if the issue is the Octopart API restriction (most probably) or not.

If it is the Octopart restriction, we cannot do anything right now. I confirm, that it might be well the case that the new API might allow us to use this aspect of PartKeepr in future. But as @Gasman2014 already noted there is no guarantee that the new interface is mighty enough to be used in our favor. Additionally, it is to my understanding not yet available for the broad public (I might have to recheck however).

If the issue is due to some internal PK bug, I will happily remove the tag of course.

What would be a very valid and useful feature request was a more verbose message for the user to understand why "nothing" is happening obviously.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

sibbi77 commented 4 years ago

see my PR #1150 as a solution

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed soon if no further activity occurs. Thank you for your contributions.