Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PartNumber with comma #416

Closed
leoheck opened this issue Jun 9, 2020 · 4 comments
Closed

PartNumber with comma #416

leoheck opened this issue Jun 9, 2020 · 4 comments
Assignees
Labels
user help User help for installation, configuration or use.

Comments

@romain145
Copy link

I think the workaround is to protect then between quotes:
image

Although now that I'm testing it, looks like it's working anymore...

C:\Users\Romain\projects\jal>kicost -i jal.xml
Progress:   0%|                                                                               | 0/42 [00:00<?, ?part/s]Traceback (most recent call last):
  File "C:\Users\Romain\AppData\Local\Programs\Python\Python38-32\Scripts\kicost-script.py", line 11, in <module>
    load_entry_point('kicost==1.1.4', 'console_scripts', 'kicost')()
  File "c:\users\romain\appdata\local\programs\python\python38-32\lib\site-packages\kicost\__main__.py", line 306, in main
    kicost(in_file=args.input, eda_name=args.eda,
  File "c:\users\romain\appdata\local\programs\python\python38-32\lib\site-packages\kicost\kicost.py", line 251, in kicost
    api_partinfo_kitspace.query_part_info(parts, distributor_dict, currency)
  File "c:\users\romain\appdata\local\programs\python\python38-32\lib\site-packages\kicost\distributors\api_partinfo_kitspace.py", line 353, in query_part_info
    get_part_info(queries[slc], query_parts[slc], query_part_stock_code[slc])
  File "c:\users\romain\appdata\local\programs\python\python38-32\lib\site-packages\kicost\distributors\api_partinfo_kitspace.py", line 197, in get_part_info
    results = api_partinfo_kitspace.query(query, distributors)
  File "c:\users\romain\appdata\local\programs\python\python38-32\lib\site-packages\kicost\distributors\api_partinfo_kitspace.py", line 133, in query
    raise Exception('Bad request to Kitspace server probably due to an incorrect string format check your `manf#` codes and contact the suport team.')
Exception: Bad request to Kitspace server probably due to an incorrect string format check your `manf#` codes and contact the suport team.
Progress:   0%|                                                                               | 0/42 [00:00<?, ?part/s]

@mdeweerd
Copy link
Contributor

Yes, I use a BT139B-600,118 and you need to add a backslash BT139B-600\,118

@hildogjr hildogjr added the user help User help for installation, configuration or use. label Jun 10, 2020
@hildogjr
Copy link
Owner

As @mdeweerd said:

https://xesscorp.github.io/KiCost

Be careful if the part have a manf# or distributor code with the ,, ; or \ characters, these have specific propose as shown in Parts With Subparts. They have to be preceded by \, example, for the NUP1301,215 code, use NUP1301\,215.

@leoheck
Copy link
Author

leoheck commented Jun 10, 2020

So, a note about this on README would be nice... the README is a good starting point for users to understand how to install and use tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
user help User help for installation, configuration or use.
Projects
None yet
Development

No branches or pull requests

4 participants