AttributeError: 'NoneType' object has no attribute 'split'

Issue #422 resolved
Giuseppe Giancola created an issue

Hello, i’m trying to make a pcb, i have gerber created eith autodesk eagle, when i try to generate a cncjob object i have this error:

[ERROR] An internal error has occurred. See shell.
Object (cncjob) failed because: 'NoneType' object has no attribute 'split'

Traceback (most recent call last):
File "D:\1.DEV\FlatCAM_beta\FlatCAMApp.py", line 2803, in new_object
File "D:\1.DEV\FlatCAM_beta\flatcamObjects\FlatCAMGeometry.py", line 1812, in job_init_single_geometry
File "D:\1.DEV\FlatCAM_beta\camlib.py", line 3965, in generate_from_geometry_2
AttributeError: 'NoneType' object has no attribute 'split'

what can i do? thank you!

Comments (17)

  1. Marius Stanciu

    Hi Giuseppe,

    What version of FlatCAM are you using? 8.992?

    LE: Can you post the Gerber file and the steps to reproduce the issue? Thanks. You can post a Dropbox/Mega/Google Drive link or you can upload to https://filedropper.com and post the link here.

  2. Marius Stanciu

    That is fixed in my working copy. Actually, if no value is provided then there is no move on the X,Y plane after finishing the job.

  3. Giuseppe Giancola reporter

    well, i had this roblem, but now it seems to be solved. i have one more issue now, i use Candle to milling the pcb, i can’t set the z-axis depth properly, it cuts too mutch, also if i set 0.05mm it goes too deeper, how can i fix this? maybe i should use a z-probe to let it set its height automatically?

  4. Marius Stanciu

    I think that 8.992 may have a problem there. I just fixed today a problem with the Z_cut in my working copy but I did not verified if it was also in the 8.992 because I thought that the extensive changes I made are responsible.
    In that case you should use the 8.991 version … there is nothing you can do.

  5. Marius Stanciu

    That’s not easy to say. It’s try and see. The application is now too complex for me to have the time to thoroughly check all the features. And it is too much in flux to have a framework for testing.

    Between 8.991 and 8.992 there were a lot of structural changes. Just like my current working copy is changing things in structure, too.
    Whenever there are structural changes there is a high possibility to have bugs and breaking changes.
    I put a lot of time lately (since January) in FlatCAM. An insane amount of time which I know that I can’t simply continue due of life having it’s requirements on me. So I am trying to finish things up.
    I had a lot of things in my my mind to add as features to FlatCAM and in part I succeeded. Those features were not easy to add but here we are and FlatCAM is what it is.
    Versions 8.993 and 8.994 will be also with new features.
    Versions 8.995, 8.996 will be made with optimizations in mind.
    Version 8.997 will be with bug fixes.
    And hopefully at that moment I can release a almost bug free version 9.0.

  6. Giuseppe Giancola reporter

    ok! thanks for your work and support, i will try the 991 and hope it will work fine! thanks again and good job!

  7. Marius Stanciu

    It should not be the case, but you could try. One of the usual fixes is to delete the preferences files and try again.

  8. Giuseppe Giancola reporter

    hello, no, it was not the proble, with the 991 solved the z depth issue, but it crashes when try to add the alignment drills for double side pcb. now, in this video i can see the guy with the 913 version, i’ll try with it and hope it works for my case

    thank you

    https://www.youtube.com/watch?v=9xczeQMj2dg

  9. Marius Stanciu

    Hi,
    Between versions, the defaults files change and sometime the changes are breaking when going from lower version to higher version or from higher version to lower version.

    Delete the preferences files and try again.
    Open program, open Preferences (Edit → Preferences), open the Pref Folder (button in the lower part of the window), in the Explorer widow that is opened delete all the files there.

    Restart FlatCAM.
    There are no issues with the Double Sided Tool.

  10. rahul kumar

    The AttributeError is an exception thrown when an object does not have the attribute you tried to access. 'NoneType' object has no attribute 'split' often indicates that the attribute you are trying to split is Null, meaning there is no value in it to split. So, you need to check the attribute is not Null before splitting. Something like..

    if val is not None:
    # ...

  11. Marius Stanciu

    @Rahul Kumar and your point is?
    This issue has been solved a while back. As for how to deal with the exceptions there are a couple of ways to do that and the most pythonic one is by using the try - except clause.

  12. Log in to comment