Please use our links: LEGO.com • Amazon
Recent discussions • Categories • Privacy Policy • Brickset.com
Brickset.com is a participant in the Amazon Services LLC Associates Program, the Amazon.com.ca, Inc. Associates Program and the Amazon EU Associates Programme, which are affiliate advertising programs designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.
As an Amazon Associate we earn from qualifying purchases.
Comments
"warning: load: can not read non-ASCII portions of UTF characters; replacing unreadable characters with '?'" Errors
and also an:
ERROR during Price Guide parsing, likely due to currency mismatch.
Non-US users, see README notes for instructions on making modifications.
>>>error: Stopping.
Anybody any ideas?
First post. LOVE this concept. As an engineer, this was the first thing I thought of when I discovered bricklink. Great job.
On my first trial run of the scripts using octave and guioctave, it runs to the question of whether or not to use PAB as a vendor. I said yes and got an error and it stopped running. I reran and said no to PAB and got what seemed like the same error. Here it is:
Removed 178 vendors for which less expensive alternatives exist.
Inventories of 364 unique stores saved to: Merged price guide data.mat
warning: C:\Octave\scripts\find_minimum_cost.m: possible Matlab-style short-circuit operator at line 172, column 14
warning: C:\Octave\scripts\find_minimum_cost.m: possible Matlab-style short-circuit operator at line 260, column 13
warning: C:\Octave\scripts\find_minimum_cost.m: possible Matlab-style short-circuit operator at line 278, column 13
warning: C:\Octave\scripts\find_minimum_cost.m: possible Matlab-style short-circuit operator at line 470, column 13
warning: C:\Octave\scripts\find_minimum_cost.m: possible Matlab-style short-circuit operator at line 512, column 13
error: caught execution error in library function
error: called from:
error: C:\Octave\scripts\find_minimum_cost.m at line 107, column 22
error: C:\Octave\scripts\RUN_ALL.m at line 15, column 1
>>
Any thoughts? BTW, I'm a FORMER mechaincal engineer turned dentist so I am super rusty with this sort of thing...
Thanks for any help in advance,
paynemic
Would you like to include LEGO Pick-A-Brick as a vendor? Y/[N]: y
Reading PAB inventory from PAB_inventory_US_Sep_28_2012.bsx
error: invalid concatenation of cell array with matrix
error: called from:
error: C:\Octave\scripts\merge_price_guide_data.m at line 113, column 38
error: C:\Octave\scripts\RUN_ALL.m at line 14, column 1
>>
Check the Troubleshooting section of the README for an explanation of how memory might be exceeded; vendor pruning is the recommended solution, not a reduction in your parts list.
The same section also mentions that Octave 'warnings' are benign, and an often overlooked step in the instructions for foreign usage is to clear the 'USonly' flag. If that flag has already been cleared, try the other currency prefix option mentioned for European union.
The error that occurs specifically on line 107 of 'find_minimum_cost.m' is now known to be a problem with Octave's 'exist' command. It's broken in certain versions of Octave and is a known bug discussed on the Octave forums. Most common solution seems to be using a different version of Octave and not running Octave through a linux emulator. Now that I've seen this error in Octave a few times I should probably add it to the Troubleshooting section of the notes...
@paynemic I have an idea why you might be seeing that; will PM you with questions to try to debug further.
I just installed and ran these scripts and I have to say they are pretty amazing. Kudos to @atxdad
I am from Canada and I actually prefer to buy from the US (cheaper shipping most of the time). I was a little dismayed that I couldn't use the US only options and had to enable international stores.
I did find a solution, though. You can google "US proxy servers" to find a current list of proxy servers located in the US. I am using octave, but I imagine MATLAB must have something similar. if you set the environment variable "HTTP_proxy" to the ip address and port of an active proxy server, bricklink will serve you up pages in USD and the cost minimization scripts will have no problem interpreting the results.
for those less tech savvy: HTTP_proxy should be an IP address followed by a port number in the format:
ipaddress:port
example:
123.456.789.012:8080
where 123.456.789.012 is the example IP address and 8080 is the example port.
you should be able to google " Proxy server", but the first hit for the US was http://www.proxynova.com/proxy-server-list/country-us/ when I searched.
Good Luck!
I had issues with the version you are using also.
Try downloading this version instead. I am using it with no issues.
http://sourceforge.net/projects/octave/files/Octave Windows binaries/Octave 3.6.1 for Windows MinGW installer/
Click on link for Octave3.6.1_gcc4.6.2_20120303.7z
Also, I'm opening up some of the interior (hidden, structural) parts to other colors. Does that increase or decrease runtime? Does that just make one part turn into multiple parts to search for in different colors? Anyway, I'm getting more and more excited.
Thanks all!
Regarding colors, per the README:
If left undefined, the program will download data from several popular candidate colors, if they exist, and later merge that pricing data into a single lot with the color field named 'Any Color'.
The net effect will likely be to increase the size of your vendor search space.
Thanks
Dave
if only I had known of the existence for my last order
i spent 60 euro less (total amount 180 euro) for my last shopping !!
some tips for better implementing operability:
on finding solution:
add color spec. for minimizing buying cost
into WANTED list generation
with no solution found with example 2 vendors
display finded minimizing solution with 2 vendors
98% of lots -> Cost -> WANTED list vendors 1,2
97% of lots -> Cost -> WANTED list vendors 1,2
with no solution found with example 3 vendors
display finded minimizing solution with 3 vendors
96% of lots -> Cost -> WANTED list vendors 1,2,3
94% of lots -> Cost -> WANTED list vendors 1,2,3
great job !!!!
Any ideas?
Thanks
Index 310: 258 of 263, 98.10%
Index 311: 259 of 263, 98.48%
Index 312: 260 of 263, 98.86%
Index 313: 261 of 263, 99.24%
Index 314: 262 of 263, 99.62%
Index 315: 263 of 263, 100.00%
Search for vendor combinations completed in 101.7 minutes
Search complete. 1.39909e+006 valid vendor combinations found.
Costing 1.39909e+006 vendor groupings...
error: memory exhausted or requested size too large for range of Octave's index type -- trying to return to prompt
>>
The Shippingcosts from US to Germany are far to expensive so I will not order from there.
If I read the code right, it decides that a store is from the US simply by seeing if the store currency matches the home currency e.g. non-US stores have '~' before the price.
The same logic could be used for any non-local currency.
http://www.bricklink.com/search.asp?pg=1&colorID=11&qMin=20&itemID=264&sellerLoc=R&viewFrom=sf®ionID=-1&sz=500&searchSort=P
The result is limited to 500 lots, but I think that's not such a big problem.
If I'm not logged in at bricklink I see all prices in USD - so does the script. After the login all prices are converted into EUR to me.
http://www.bricklink.com/search.asp?q=3001&itemType=P&pg=1&colorID=11&qMin=20&sellerLoc=R&shipCountryID=DE®ionID=-1&sz=500&searchSort=P
@atxdad: Do you think you can modify the readpriceguide.m script to use the search instead of the price guide page?
I'm working on a project and have a solution but have no way of getting it. I haven't made any changes at all.
Thanks,
Mike
PM me! I would greatly appreciate for the help.
i am in europe /germany so i set the USonly flag to '0' as told in the README, however i still get this error :
ERROR during Price Guide parsing, likely due to currency mismatch.
Non-US users, see README notes for instructions on making modifications.
error: Stopping.
error: called from:
error: /Volumes/Data/lani/Downloads/BrickLink_cost_minimization_Matlab_V9b/findnextstring.m at line 12, column 5
error: /Volumes/Data/lani/Downloads/BrickLink_cost_minimization_Matlab_V9b/parsepriceguidestring.m at line 36, column 14
error: /Volumes/Data/lani/Downloads/BrickLink_cost_minimization_Matlab_V9b/readpriceguide.m at line 66, column 92
error: /Volumes/Data/lani/Downloads/BrickLink_cost_minimization_Matlab_V9b/parse_wanted_list_and_price_guide.m at line 100, column 58
error: /Volumes/Data/lani/Downloads/BrickLink_cost_minimization_Matlab_V9b/RUN_ALL.m at line 13, column 1
i am using octave on mac os if it helps. unfortunately i have no idea how to debug a matlab script. any help would be great.
I don't know about debugging in Octave, but you can get an idea of what data the script is retrieving from Bricklink by going to a part page in your web browser.
The trick to this is that you first need to log out of BL and also delete some BL browser cookies (specifically isCountryID and viewCurrencyID). If you're not logged in, these two cookies are automatically set, apparently based on the location of you IP address. If you're logged in, they're set according to your BL settings.
You'll know you've successfully killed the cookies if the page loads without the green and red blocks that indicate whether or not the store ships to you (see picture below). You'll see that if you refresh the page, the blocks will reappear.
The currency symbol shown on the page is the one that the script should search for (you can also view the page source to confirm this).
exist(mxvendorsearchloop)
which I think is correct, then I get:
error: could not find library or dependents: C:\Users\LEY\DOCUME~1\personal\Lego\BRICKL~1\mxvendorsearchloop.mex
Even though the file it appears to be looking for does exist in the location it is pointing to. Does anyone have any ideas? I'm wondering if there are issues running 32-bit octave on 64-bit windows (I assume Octave is 32-bit although I'm not entirely sure how to check).
I should note that it works fine with the uncompiled code, but I would like to get this working as I have a big-ish part list to work with.
If I just try to run mxvendorsearchloop (which is what Ithink I was doing before by not passing the name as a string) then I get:
error: could not find library or dependents: C:\Users\LEY\DOCUME~1\personal\Lego\BRICKL~1\mxvendorsearchloop.mex
I get this same error if try and run any of the .mex## files.
Changing the currency string from 'US' to 'EUR' works fine and the scripts are running now.
as for the exits() bug in octave, i am running octave 3.6.4 compiled via fink on mac os mountain lion. maybe this helps identifying the problem.
ROSCO
If you log in, it sets the cookies to the currency and country in your profile.
Once cookies have been set, either to default values or profile values, every page is displayed with currency and shipping country according to the cookies.
The problem with the script queries is that Matlab's URLread function cannot send or set any cookies, so the currency value is always the value from the IP address and the shipping country is never used.
I've found a way to modify the Matlab URLread function to send cookies. I've sent the WIP to atxdad, so the ability to set shipping country and currency may appear at some point in a future version.