Cannot run FlatCAM 8.995 with source

Issue #525 new
俊霄 余 created an issue

I was downloaded FlatCAM_beta 8.995,but I can’t run it.

In ubuntu shell,there is some err.I can’t solve it.Please help!!

“RuntimeError: Refusing to import PyQt5 because PyQt6.QtCore is already imported.“

Comments (37)

  1. Marius Stanciu

    Hi,

    PyQt5 and PyQt6 can not coexist due of the VisPy package.
    You need to uninstall PyQt5 or you need to setup an virtual environment for Python where only PyQt6 is installed.

  2. 俊霄 余 reporter

    Another question

    In windows cmd,Run with “python FlatCAM.py“ command,then nothing happend! What is wrong with it??

  3. Marius Stanciu

    It depends what nothing means. Have you tried to test the python installation first?

    What is the output if you run:
    python --version

  4. Marius Stanciu

    Hi,

    Check the path:

    C:\Users\boby jx\AppData\Roaming\FlatCAM

    and post here the content in the file log.txt

  5. 俊霄 余 reporter

    Hi,There is the error message:

    2021-08-24 10:14:09.420276
    Traceback (most recent call last):
    File "C:\Users\bobyjx\Desktop\marius_stanciu-flatcam_beta-2bde27631f9c\FlatCAM.py", line 160, in <module>
    style = QtWidgets.QStyleFactory.keys()[int(style_index)]
    ValueError: invalid literal for int() with base 10: 'windowsvista'

  6. Marius Stanciu

    Hi,

    I think you have some leftovers from previous versions.
    You need to open regedit utility and go to the following:

    Computer\HKEY_CURRENT_USER\SOFTWARE\Open Source\FlatCAM

    And in the key style write the value 0

  7. 俊霄 余 reporter

    thanks,I have successfully run the program.

    Report a BUG

    In cutout. When I click on Generate Geometry button but not select any Geometry or Gerber,the programe will close without any Warning message.

    Report a Suggest

    In cutout,I can only select 'lr', 'tb', '2lr', '2tb', 4 or 8 type of gaps.I suggest add a custom option that I can custom gaps number.

  8. Marius Stanciu

    In cutout,I can only select 'lr', 'tb', '2lr', '2tb', 4 or 8 type of gaps.I suggest add a custom option that I can custom gaps number.

    You have the manual option where you can add gaps where you want and as many as you want. In Advanced Mode.

  9. Marius Stanciu

    In cutout. When I click on Generate Geometry button but not select any Geometry or Gerber,the programe will close without any Warning message.

    Fixed in the latest commit. The updated Chinese translation is also added.

  10. 俊霄 余 reporter

    There is an other BUG

    There is no response from the program when use “Convert Any to Excellon” function.

    The programe will close without any Warning message when use “Convert Any to Geo” function.

  11. 俊霄 余 reporter

    2021-08-26 22:01:19.006226
    Traceback (most recent call last):
    File "C:\Users\bobyjx\Desktop\marius_stanciu-flatcam_beta-c8763f9c8f62\appObjects\ObjectCollection.py", line 1000, in on_list_selection_change
    obj.build_ui()
    File "C:\Users\bobyjx\Desktop\marius_stanciu-flatcam_beta-c8763f9c8f62\appObjects\FlatCAMGeometry.py", line 199, in build_ui
    offset_item_txt = self.offset_item_options[tooluid_value['data']['tools_mill_offset_type']]
    KeyError: 'tools_mill_offset_type'

  12. 俊霄 余 reporter

    Report a BUG1

    In cutout.I add gaps with manual option,and I click left mouse botton,but it will crash when I try to add gaps again.

    Here is my log:

    “2021-08-29 17:17:42.741610
    Traceback (most recent call last):
    File "C:\Users\bobyjx\Desktop\marius_stanciu-flatcam_beta-30802901c795\appPlugins\ToolCutOut.py", line 1626, in on_manual_gap_click
    self.mb_manual_solid_geo = self.flatten(unary_union(self.manual_solid_geo).buffer(b_dia).interiors)
    AttributeError: 'MultiPolygon' object has no attribute 'interiors'“

    Report a BUG2

    Use the “Convert Multi to SingleGeo“ function,it will crash.

    Here is my log:

    “2021-08-29 22:41:26.460061
    Traceback (most recent call last):
    File "C:\Users\bobyjx\Desktop\marius_stanciu-flatcam_beta-30802901c795\app_Main.py", line 4566, in on_convert_multigeo_to_singlegeo
    dict_value['solid_geometry'][:] = []
    TypeError: 'MultiLineString' object does not support item assignment“

    Report a BUG3

    If I select Legacy(2D), the program will not start.

    Here is my log:

    “2021-08-29 22:01:00.719645
    Traceback (most recent call last):
    File "C:\Users\bobyjx\Desktop\marius_stanciu-flatcam_beta-30802901c795\FlatCAM.py", line 140, in <module>
    fc = App(qapp=app)
    File "C:\Users\bobyjx\Desktop\marius_stanciu-flatcam_beta-30802901c795\app_Main.py", line 1134, in init
    raise BaseException("Failed to start the Canvas")
    BaseException: Failed to start the Canvas“

  13. Marius Stanciu

    Hi 俊霄 余,

    Regarding the first two bugs I would very much like to know what was that you were doing and I mean the exact steps and the shape of the geometry you were using. In any case I think I solved both issues in the latest commit.

    Regarding the 3rd reported issue, it is not a bug. Simply said, the matplotlib package that is behind the 2D Legacy graphic mode does not support currently PyQt6. Until they make a new release to support PyQt6, this mode is not functional.

  14. 俊霄 余 reporter

    In BUG1

    1.Add a grb file.

    2.In cutout function,click “Generate Manual Geometry“

    4.click “Manual“ button,click “Manual Add Bridge Gaps“,add gaps where I want,click left mouse button.

    5.click “Manual Add Bridge Gaps“,add gaps where I want.

    6.Programe will shutdown.

    In BUG2

    1.Select Geometry that cutout Generated.

    2.click “Convert Multi to SingleGeo“.

    3.Programe will shutdown.

  15. 俊霄 余 reporter

    New BUG

    If I select two of Geometry Item and click “Edit Object“ , program will shutdown without any Warning message.

    log:

    “2021-08-30 09:59:44.602533
    Traceback (most recent call last):
    File "C:\Users\bobyjx\Desktop\marius_stanciu-flatcam_beta-30802901c795\appPlugins\ToolCutOut.py", line 1626, in on_manual_gap_click
    self.mb_manual_solid_geo = self.flatten(unary_union(self.manual_solid_geo).buffer(b_dia).interiors)
    AttributeError: 'MultiPolygon' object has no attribute 'interiors'“

  16. 俊霄 余 reporter

    Report an issue

    This program GUI has some diffrance between windows and ubuntu,like HUD text,plot area.In ubuntu ,look great than windows.

    windows:

    ubuntu:

  17. Marius Stanciu

    Hi,

    New BUG

    If I select two of Geometry Item and click “Edit Object“ , program will shutdown without any Warning message.

    Can you please send me the project with those 2 geometries that when selected together and edited it generates a crash? Thank you!
    In this case the program should edit only the last selected geometry object in the selection.

    This program GUI has some diffrance between windows and ubuntu,like HUD text,plot area.In ubuntu ,look great than windows.

    I have no control on how the program is rendered on different OS’s. Yet, I know that the HUD had some issues and I’ve updated the app in the latest commit such that the HUD rectangle is now updated in real time depending on the length of the coordinates text.

  18. 俊霄 余 reporter

    In this case,you can try select whatever gbr file and use “Convert Any to Geo“ twice and select both of them and use “Edit Object“,it will reproduce the problem.

  19. Marius Stanciu

    What is the scaling value that you use in Windows Display Settings? What kind of display (resolution) do you use? A 4K one?
    I can test on 2k and HD monitors and all is Ok in those.

  20. Marius Stanciu

    I guess your HUD font in Preferences was set too high and the app did not took into consideration the font size set in Preferences but the default one. Most likely the issue was because in Windows you changed the HUD font size.
    Fixed in the latest commit.

  21. 俊霄 余 reporter

    My resolution is 3K(surface pro 7),scaling value =175%.

    It's still the same in the new version

  22. Marius Stanciu

    What is the size of the HUD font set in Preferences → General → App Settings → Font Size → HUD?
    Try to set it at most at 20 points.

  23. Marius Stanciu

    Hi,

    Change the HUD font size to 10. It looks like you have old values, leftovers from other versions.

  24. 俊霄 余 reporter

    Report another BUG

    In “Milling“,If I choose Excellon, then click “Generate CNCJob object“,progrme will do nothing!

  25. Marius Stanciu

    Hi,

    In “Milling“,If I choose Excellon, then click “Generate CNCJob object“,progrme will do nothing!

    This is not a bug, it is OK. This section functionality is not implemented at the moment only the GUI has been put in place to allow the future functionality. For milling holes use the Utility button in the Excellon Properties Tab.

  26. 俊霄 余 reporter

    I would like to know how to package the program as an installation file or ask you to release the installation package so that it can be installed on other Windows computers. Although it is unstable beta, I think it is good enough and I would like to recommend it to my friends who do not know how to configure Python modules.

  27. Marius Stanciu

    Right now the Units changing is broken. Tools Database is broken. Excellon Milling is not implemented. The Geometry object data structure still needs to be checked in all parts of the program. Most likely many of the Tcl commands are broken.

  28. 俊霄 余 reporter

    can not run with new version(marius_stanciu-flatcam_beta-1d1613d2d662),I can’t find qdarktheme package!

    Traceback (most recent call last):                                                                                       
    
     File "C:\Users\bobyjx\Desktop\marius_stanciu-flatcam_beta-1d1613d2d662\FlatCAM.py", line 8, in <module>                   
     from app_Main import App                                                                                              
    
    File "C:\Users\bobyjx\Desktop\marius_stanciu-flatcam_beta-1d1613d2d662\app_Main.py", line 42, in <module>                 
    import qdarktheme                                                                                                  
    
     ModuleNotFoundError: No module named 'qdarktheme'
    

  29. Log in to comment