PeterH Posted February 9, 2015 Report Share Posted February 9, 2015 I've run several examples now but one that I can't get to work is the Papilio_DUO_BitCoin_Miner example. When I try to load, view or edit the circuit associated with this sketch I get a stack trace in the IDE message area, for example:Exception in thread "AWT-EventQueue-0" java.lang.StringIndexOutOfBoundsException: String index out of range: -1214 at java.lang.String.substring(Unknown Source) at processing.app.EditorToolbar.getKeyWord(EditorToolbar.java:520) at processing.app.EditorToolbar.getLibraryFile(EditorToolbar.java:461) at processing.app.EditorToolbar.mousePressed(EditorToolbar.java:417) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$200(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)There is a library named BitCoin_Miner containing a circuit subdirectory, and as far as I can see this is what the #define circuit BitCoin_Miner declaration is intended to reference, but for some reason it's not working. I have confirmed that in other examples, if a non-existent circuit is referenced the IDE handles that gracefully. However, for the Papilio_DUO_BitCoin_Miner example, if I change the sketch to reference a non-existent circuit this still throws an exception. I suspect there's something wrong with the structure of the Papilio_DUO_BitCoin_Miner example which is breaking the IDE's circuit-processing logic. Has anyone alse managed to open this example in the IDE and Load, View or Edit the circuit? Quote Link to comment Share on other sites More sharing options...
Jack Gassett Posted February 10, 2015 Report Share Posted February 10, 2015 Hey PeterH, It's looking for a newline, just put an extra line after the #define circuit line and it should work. I'll make a fix for this bug in the next release. Jack. Quote Link to comment Share on other sites More sharing options...
PeterH Posted February 10, 2015 Author Report Share Posted February 10, 2015 Thank you, that fixed it nicely. Now I'm onto fighting Python errors; I guess this was designed for Python V2. Quote Link to comment Share on other sites More sharing options...
TampaGuy Mike Posted October 30, 2017 Report Share Posted October 30, 2017 I too am trying to get this example to work. It seems there are several Python files that are necessary that I can't seem to locate. Is there a target version of Python that I should be using that have these libraries? Or, are these Python libraries available anywhere for me to add to the project? Thanks to all who can answer Quote Link to comment Share on other sites More sharing options...
TampaGuy Mike Posted October 30, 2017 Report Share Posted October 30, 2017 I found the files. They didn't copy over to the sketch folder automatically. They needed to be manually copied over from the Designlab folder and installed. It is also useful to make note that Python 2.7 is required. Version 3.6 didn't work, i installed 2.7.14 and it worked nicely. Quote Link to comment Share on other sites More sharing options...
Jack Gassett Posted October 31, 2017 Report Share Posted October 31, 2017 This type of project would be a great candidate to get setup with Docker/Codenvy so all the files are in place and ready to go for people... Jack. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.