Coder Social home page Coder Social logo

Streaming file is not working about bcnc HOT 7 CLOSED

vlachoudis avatar vlachoudis commented on August 28, 2024
Streaming file is not working

from bcnc.

Comments (7)

vlachoudis avatar vlachoudis commented on August 28, 2024

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.

cribskip avatar cribskip commented on August 28, 2024

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.

vlachoudis avatar vlachoudis commented on August 28, 2024

Could you please try the latest version. I've added a try: catch: around the menuentry

from bcnc.

cribskip avatar cribskip commented on August 28, 2024

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.

vlachoudis avatar vlachoudis commented on August 28, 2024

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.

cribskip avatar cribskip commented on August 28, 2024

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.

vlachoudis avatar vlachoudis commented on August 28, 2024

Thank you for helping me to debug in Mac.

from bcnc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.