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

Telegram not responding when selecting file after "/file" command #89

Closed
chwinter82 opened this issue Aug 19, 2017 · 7 comments · Fixed by #173
Closed

Telegram not responding when selecting file after "/file" command #89

chwinter82 opened this issue Aug 19, 2017 · 7 comments · Fixed by #173
Labels
Milestone

Comments

@chwinter82
Copy link

chwinter82 commented Aug 19, 2017

Hi,
I have two octopis running (on two different PIs).
Both were running fine and now I have trouble with just one:
when I enter "/files" via telegram, the files are listed, but when I want to select a file (for printing e.g.), then nothing happens.
I already deactivated the telegram plugin and also reinstalled it, but with no success.

@chwinter82
Copy link
Author

Hi,
as I'm not receiving any answers yet, what would a way to solve the issue? reinstall the Pi completely new?

@yorambi
Copy link
Contributor

yorambi commented Sep 29, 2017

in OctoPrint setting on the Telegram plugin at bottom part, set "Enable logging of debug information for this plugin to octoprint.log"
then check the messages printed there to possibly find the issue...
the lines start with octoprint.plugins.telegram.

@chwinter82
Copy link
Author

Just found out via the log file and then googling the error line:
cost plugin is causing this issue. you have to setup the cost plugin correctly or deactivate the cost plugin.
after that, telegram plugin works without any problem.

thanks @ALL for the help.

@yorambi
Copy link
Contributor

yorambi commented Oct 1, 2017

the telegram plugin currently (1.43) do not support version 0.1.3 of the cost plugin
as the code in telegramCommands.py do not get the correct cost parameters

cost_per_hour is now cost_per_time
cost_per_meter is now cost_per_length
the calculation also changed

two functions fileDetails and fileOption have the below code with cpM and cpH getting the value none, this fails the /file command

cpH = self.main._settings.global_get_float(["plugins","cost","cost_per_hour"])
cpM = self.main._settings.global_get_float(["plugins","cost","cost_per_meter"])
curr = self.main._settings.global_get(["plugins","cost","currency"])
try:
	curr = curr.decode("utf-8")
except Exception, ex:
	pass
msg += "\n<b>Cost:</b> "+curr+"%.02f " % ((filaLen/1000) * cpM + (printTime/3600) * cpH)

see issue #80

@derpicknicker1
Copy link
Collaborator

This Issue will be fixed in next update. Will come the next days.

@derpicknicker1 derpicknicker1 added this to the 1.4.3 milestone Jan 4, 2018
@jlsjonas
Copy link
Contributor

jlsjonas commented Apr 9, 2019

Hi, any update on this?

@giloser
Copy link
Collaborator

giloser commented May 7, 2019

Hi,

I think the problem is that the cost plugin change the variable name
we should change this
cpH = self.main._settings.global_get_float(["plugins","cost","cost_per_hour"])
cpM = self.main._settings.global_get_float(["plugins","cost","cost_per_meter"])
curr = self.main._settings.global_get(["plugins","cost","currency"])

into something like
cpH = self.main._settings.global_get_float(["plugins","cost","cost_per_time"])
cpM = self.main._settings.global_get_float(["plugins","cost","cost_per_length"])
curr = self.main._settings.global_get(["plugins","cost","currency"])

maybe add a try and except to avoid new trouble if the plugin change again.

jlsjonas added a commit to jlsjonas/OctoPrint-Telegram that referenced this issue May 10, 2019
Updates cost plugin's variables, fixes fabianonline#89 & likely fabianonline#80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants