Comments (7)
Thank you for the bug report. When clicking on RUN it disables all commands to avoid any error from the user. Apparently in MAC it fails to disable the menu options. Most probably with the different way the mac is using the menu compared to linux/windows. I don't have a MAC to test, so could you do a small change in the program to check.
in the bCNC.py find the function configWidgets (line; 1419)
and change the function from:
def configWidgets(self, var, value):
for w in self.widgets:
if isinstance(w,tuple):
w[0].entryconfig(w[1], state=value)
elif isinstance(w,tkExtra.Combobox):
w.configure(state=value)
else:
w[var] = value
to:
def configWidgets(self, var, value):
for w in self.widgets:
#if isinstance(w,tuple):
# w[0].entryconfig(w[1], state=value)
if isinstance(w,tkExtra.Combobox):
w.configure(state=value)
else:
w[var] = value
Comment the first branch of the if statment, and replace the elif to if
be careful on the indentation and tabs
V.
from bcnc.
Hi,
I just tested the change but behavior is the same but terminal message changed:
Exception in Tkinter callback
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1470, in call
return self.func(*args)
File "./bCNC.py", line 2450, in run
self.initRun()
File "./bCNC.py", line 2436, in initRun
self.disable()
File "./bCNC.py", line 1433, in disable
self.configWidgets("state",DISABLED)
File "./bCNC.py", line 1426, in configWidgets
w[var] = value
TypeError: 'tuple' object does not support item assignment
UPDATE:
When replaceing the function body in disableWidgets with pass, I get further but it fails streaming with:
Exception in thread Thread-3:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run
self.__target(_self.__args, *_self.__kwargs)
File "./bCNC.py", line 2586, in serialIO
self.serial.write(tosend)
File "/Library/Python/2.7/site-packages/serial/serialposix.py", line 491, in write
d = to_bytes(data)
File "/Library/Python/2.7/site-packages/serial/serialutil.py", line 76, in to_bytes
b.append(item) # this one handles int and str for our emulation and ints for Python 3.x
TypeError: an integer or string of size 1 is required
from bcnc.
Could you please try the latest version. I've added a try: catch: around the menuentry
from bcnc.
I just tested the new version. The error did not occur anymore, however, streaming still throws this when clicking on start:
Sascha-Air:bCNC-master-2 sascha$ ./bCNC
Exception in thread Thread-2:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run
self.__target(_self.__args, *_self.__kwargs)
File "./bCNC.py", line 2595, in serialIO
self.serial.write(tosend)
File "/Library/Python/2.7/site-packages/serial/serialposix.py", line 491, in write
d = to_bytes(data)
File "/Library/Python/2.7/site-packages/serial/serialutil.py", line 76, in to_bytes
b.append(item) # this one handles int and str for our emulation and ints for Python 3.x
TypeError: an integer or string of size 1 is required
I guess it's related to the gcode I throw at it made by makercam.
from bcnc.
The serial.write is failing in your case. It might be that you are sending unicode characters. I've added an extra check to convert to str. Could you try to see if it works
from bcnc.
Wow, amazing work :) Really enjoyed machining with your GUI 👍
I had to change the generated code in order to make it work now from (remove G40):
(Generated by PartKam Version 0.05)
G21 G90 G40
(follow path 1)
G0 Z10
T0 M6
G17
M3
to:
G21 G90
G0 Z10
G17
M3
Thanks again! Also for your great support :)
from bcnc.
Thank you for helping me to debug in Mac.
from bcnc.
Related Issues (20)
- Font(?) issue on Fedora 38 and CentOS Stream 9 HOT 1
- abc Coord Values not shown in abcDRO labels (Wrong indentation on ControlPage.py)
- Drag knife solenoid delay. HOT 2
- TypeError: 'range' object doesn't support item deletion, triggered by Utils.py:533
- can not update HOT 4
- incompatible numpy version?
- Tabs created as progressive up/down moves. HOT 1
- undo modification in garc definition
- Fonts specified in px, not point.
- Exceptions when hacked
- UnboundLocalError: cannot access local variable 'ef' where it is not associated with a value
- Large files issue random straight lines HOT 3
- Customizable button. How to update variable value? HOT 1
- Issue due to"sudo python3 -m bCNC"
- Enable Private Vulnerability Reporting in GitHub
- gcode is displayed in a small scrollable frame. HOT 4
- Dragknife M5 after every path
- Slice mesh doesn't work HOT 2
- Coordi ates display
- 100% reproducible: Crash after "scan"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bcnc.