Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message "Layer indicator not found in file! " #117

Closed
freddydelange opened this issue Feb 15, 2020 · 27 comments
Closed

Error message "Layer indicator not found in file! " #117

freddydelange opened this issue Feb 15, 2020 · 27 comments
Labels
status: markedForAutoClose Issue will be closed automatically status: waitingForTestFeedback type: bug Something isn't working

Comments

@freddydelange
Copy link

Every time I want to print something with Octoprint I get the following error message:
Layer indicator not found in file! Check layer pattern in DisplayLayerProgress-Settings and reupload the file!
The slicer that I use is Cura 4.4.1 but other slicers generate the same message.
My knowledge is not sufficient enough to solve this. Is there someone who can help me with the right settings?
Windows 10
Printrer Creality Ender 3
Cura 4.4.1
Octoprint version Version 1.3.12 with the latest plugins.
I am almost certain that it must be something in octoprint or the plugin because it also gets me the message with other slicers. am a newbey so it is rather difficult for me maybe it will be easier by e-mail? thanks in advance otherwise don't know how to make a ticket (sorry)

Start and stop Gcodes i use in Cura are:

Cura Start Gcode

G28 ; home all axes
M117 Purge extruder
G92 E0 ; reset extruder
G1 Z1.0 F3000 ; move z up little to prevent scratching of surface
G1 X0.1 Y20 Z0.3 F5000.0 ; move to start-line position
G1 X0.1 Y200.0 Z0.3 F1500.0 E15 ; draw 1st line
G1 X0.4 Y200.0 Z0.3 F5000.0 ; move to side a little
G1 X0.4 Y20 Z0.3 F1500.0 E30 ; draw 2nd line
G92 E0 ; reset extruder
G1 Z1.0 F3000 ; move z up little to prevent scratching of surface
M117 All systems go!

Cura Stop Gcode

G91 ;Relative positionning
G1 E-2 F2700 ;Retract a bit
G1 E-2 Z0.2 F2400 ;Retract and raise Z
G1 X5 Y5 F3000 ;Wipe out
G1 Z10 ;Raise Z more
G90 ;Absolute positionning
G1 X0 Y{machine_depth} ;Present print
M106 S0 ;Turn-off fan
M104 S0 ;Turn-off hotend
M140 S0 ;Turn-off bed
M84 X Y E ;Disable all steppers but Z

And some Sreenshots of DisplayLayerProgress-Settings
Error
Display1
Display2
Height
Layer

Please i need help with this

@OllisGit
Copy link
Owner

Hi @freddydelange ,
please do the following:

  • Save the generated gcode from Cura to your hard drive

  • Open the file with a text editor and look for ;LAYER:. Should appear for each layer. If it is not included, it is a slicer issue. Maybe there is a switch for removing all comments (line starting with ;)

  • Upload the gcode to OctoPrint

  • Download the gcode from OctoPrint to your hard drive (small icon in filemanager)

  • Open the file in text editor. Behind each above layer-comment you should see M117 INDICATOR-Layer

Hope that helps!

@OllisGit OllisGit changed the title Error message from DisplayLayerProgress-Settings Error message "Layer indicator not found in file! " Feb 15, 2020
@freddydelange
Copy link
Author

Hey,
I have gone through the indicated points and I think the Gcode from Cura is good but in the Gcode downloaded from Octoprint I cannot find the M117 I will send you the two files for review.
I like to hear from you

FromOctoprint_calibration_cube.zip
FromCura calibration_cube.zip

@gdombiak
Copy link

I'm using Python 3, latest version of this plugin, latest version of OctoPrint (github) and PrusaSlicer 2.1.1. I'm seeing the same error message and found the reason for my issue.

Screenshot:
Screen Shot 2020-02-15 at 4 07 53 PM

Gcode file:
OUT_E_PETG tempTower_220_235.gcode.zip

Problem:
In LayerDetectorFileProcessor line 134, the variable line is a byte and not a string so if (len(line) != 0 and line[0] == ";"): always returns false.

The following change fixes the problem:

  if (len(line) != 0):
        line = line.decode('utf-8')
        if (line[0] == ";"):
            for layerExpression in self._allLayerExpressions:
                inputLine = line
                line = self._modifyLineIfLayerComment(inputLine, layerExpression)
                if line is not inputLine:
                    # pattern matched, skip other expressions
                    break
            line = line.encode('utf-8')
        else:
            line = origLine
    else:
        line = origLine
    return line

I have not tested this with previous version of OctoPrint or Python.

@OllisGit
Copy link
Owner

Hi @gdombiak , @freddydelange ,

I retested with python 3 and I can confirm that OctoPrint now sends "bin" instead of "str" line-type.
@gdombiak thanks a lot for analysing the issue!

@freddydelange just to make sure: what python version do you use

The issue will be fixed in next version.

@OllisGit
Copy link
Owner

Hi @gdombiak ,

you should improve your slicer layer-hook script (if you use the default DLP layer-settings)
Because your gcode includes two comment-indicators:

;BEFORE_LAYER_CHANGE
...
;LAYER:23

The result after uploading includes two M117 commands with different layer numbers:

G1 X129.165 Y106.594 E0.02765
; stop printing object tempTower_220_235.stl id:0 copy 0
;BEFORE_LAYER_CHANGE
M117 INDICATOR-Layer24
; G92 E0.0
;4.8
;LAYER:23
M117 INDICATOR-Layer23

@gdombiak
Copy link

Thanks @OllisGit for catching that. I removed ;LAYER:[layer_num] that was added for my temp tower. I now have this as custom gcode before layer change:

;BEFORE_LAYER_CHANGE
; G92 E0.0
;[layer_z]

It seems like PrusaSlcier does not have a variable that I could use for ;MAXZ: so I guess your plugin will do its best to estimate the max z height.

@gdombiak
Copy link

@OllisGit I opened OctoPrint/OctoPrint#3454 to see if we can do something in OctoPrint so plugins like this one do not break when running with Python 3

OllisGit added a commit that referenced this issue Feb 17, 2020
…Python3 bug

- #115 optimize the first output of the filamentchangetime
@OllisGit
Copy link
Owner

Hi @freddydelange , @gdombiak ,
new Version 1.18.0 is out.

Now it works with:

  • OP 1.4.x with Python2/3
  • OP 1.13.10 with Python2

Please test and give feedback.
Thx, in advance
Olli

@OllisGit OllisGit added status: waitingForTestFeedback type: bug Something isn't working and removed status: inNextRelease Will be implemented/fixed in next release status: waitingForFeedback Wating for Customers feedback labels Feb 17, 2020
@gdombiak
Copy link

will update tonight! thanks for the super fast turnaround

@freddydelange
Copy link
Author

freddydelange commented Feb 18, 2020 via email

@freddydelange
Copy link
Author

Hello all
Unfortunately, after the update to version 1.18.0, the error message is still present.
But thank you so much for all your commitment so far
Again my knowledge level is from a beginner I see several sugestions pass by but would not know where to start,
Kind regards Freddy

@OllisGit
Copy link
Owner

Hi @freddydelange,
after installing the new plugin-version, did you re-upload your gcode files again?
Because the layer detection is only done via upload-process.
So, if you just click on already uploaded files, then you will see the popup.

In a previous version I changed that behaviour (file selection), but then I have a lot of other issues (large-files, autostart, etc.)

@freddydelange
Copy link
Author

freddydelange commented Feb 19, 2020

Hey,
yes I have reloaded the files and even created new ones to make sure that it would not be due to it but it did not help Have also tried other versions of cura now running with version 4.0 but this also does not help

@OllisGit
Copy link
Owner

I think it has nothing to do with Cura.

Which version of python do you use?

Please look into the octoprint.log file after uploading a new file. Or even better attach the logfile to this issue, maybe I can identify some errors.

@freddydelange
Copy link
Author

freddydelange commented Feb 21, 2020

Hi there,
Sorry for the late reply I am sending 2 log files
octoprint.log
for review and I hardly dare to ask but where do I get the python version information from?
Thanks again and exusses for my ignorance
octoprint (2).log

Ps found Python version on my raspberryp it's 2.7.13

@OllisGit
Copy link
Owner

OllisGit commented Feb 22, 2020

Hi @freddydelange ,
no problem, take your time.

I looked into your two log files:

  1. log file 09.02.2020 - 10.02.2020
    You use DLP 1.17.1 and often the server was started in SAFE-Mode
INFO - Starting in SAFE MODE. Third party plugins will be disabled!
INFO - Reason for safe mode: setting in config.yaml

So, DLP will not work!

  1. log file 20.02.2020 - 21.02.2020
    New Version 1.18.0 is installed, great!
    DLP is working and detect the missing layer indicators.
    But I can't see an upload event of your selected gcode-file: CE3_Woman_body_for_vase_mode_v16.gcode
    So, no fresh upload, no layer detection!

Please do the following

  • go to the logging section. end delete octoprint.log
  • activate log-level debug for octoprint
  • save settings
  • re-upload your gcode file
  • select the file and start printing...and stop it
  • download octoprint.log and attach it to this issue

BTW. You credentials for getanywere is wrong or missing, you should deactivate it.

HTTPError: 401 Client Error: Unauthorized for url: http://newstream.getanywhere.io/api/dev_settings

@drdeimos
Copy link

Hi, OllisGit.
It's not working if I uploaded file in directory which is defined in the settings: Folder -> Upload Folder?

When do it, doesn't see any messages in octoprint.log about my file from DisplayLayerProgress

@1larity
Copy link

1larity commented Mar 1, 2020

This breaks Marlin's K factor test. It is not necessary to have any layer markers for a single layer print.
I just disabled dashboard and display layer height, they do not offer any information that is not present in Octoprint already and take up a tab for no good reason.

@OllisGit
Copy link
Owner

OllisGit commented Mar 1, 2020

Hi @drdeimos,
you need to use the browser ui for uploading the gcode (drag&drop). Direct upload to the folder via ssh,ftp doesn't work.
The plugin use the OctorPrint Upload-Event-Listener.

@drdeimos
Copy link

drdeimos commented Mar 1, 2020

Sad to hear that, but thanks.

@drdeimos
Copy link

drdeimos commented Mar 1, 2020

I'm not sure for this, but what about to replace upload handling on file handling?
https://docs.octoprint.org/en/1.3.12/events/index.html#file-handling

@OllisGit
Copy link
Owner

OllisGit commented Mar 1, 2020

Hi @drdeimos ,
I already tried this in Version 1.16.0, but then I have a lot of other issues and "race-conditions". With the REST-API for uploading and autostarting the print-job. I received a lot of tickets, so I switched back to my "bullet-proofed" approach.
Maybe I will try it again in later version.

@drdeimos
Copy link

drdeimos commented Mar 1, 2020

Ok. Thx.

@freddydelange
Copy link
Author

freddydelange commented Mar 8, 2020 via email

@OllisGit
Copy link
Owner

OllisGit commented Apr 5, 2020

Hi @freddydelange ,
there is no log-file attached!
Don't use the Email-Answer function. Doesn't work with attachments.
You need to upload the file via GitHub-UI.

@OllisGit OllisGit added status: inNextRelease Will be implemented/fixed in next release and removed status: waitingForTestFeedback labels Apr 6, 2020
OllisGit added a commit that referenced this issue Apr 8, 2020
Bugs
#134, #124, #128, #131, #127, #126
Enhance
#132 State-Section
101, #117 option to deactivate adding M117 layer-indicators
@OllisGit
Copy link
Owner

OllisGit commented Apr 8, 2020

Hi,
new version 1.19.0 is out now and solves some issues.
@drdeimos you can now disable adding Layer-Indicator-Command during upload, then you can put this command into your slicer. See https://github.com/OllisGit/OctoPrint-DisplayLayerProgress/releases/tag/1.19.0

@OllisGit OllisGit added status: waitingForTestFeedback and removed status: inNextRelease Will be implemented/fixed in next release labels Apr 8, 2020
@stale
Copy link

stale bot commented Aug 5, 2020

This issue has been automatically marked for closing, because it has not had activity in 30 days. It will be closed if no further activity occurs in 10 days.

@stale stale bot added the status: markedForAutoClose Issue will be closed automatically label Aug 5, 2020
@stale stale bot closed this as completed Aug 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: markedForAutoClose Issue will be closed automatically status: waitingForTestFeedback type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants