Comments (16)
@ankit-sinha-18, you created a good issue. I never noticed this before. Hopefully, this will be fixed in the next release. read #43
make sure to star and watch this repository, to stay updated.
from tgcf.
Okay, Thank you...
I have a doubt,
Can't poll / Quiz be forwarded without forward tag?
because,I have used unofficial version of telegram like plus messenger,telegraph,bgram..
In All these apps,when forwarding poll / Quiz without quotes,It gets forwarded with quotes automatcally.
from tgcf.
@ankit-sinha-18 does this error still occur? the screenshot you showed is of the old version.
please try again with a new version
from tgcf.
Can't poll / Quiz be forwarded without forward tag?
because,I have used unofficial version of telegram like plus messenger,telegraph,bgram..
In All these apps,when forwarding poll / Quiz without quotes,It gets forwarded with quotes automatically.
i cant understand. please show a screenshot for this.
from tgcf.
@ankit-sinha-18, I tested with the new version, and this error does not occur anymore.
after the major release of tgcf 0.1.17, this issue is solved, due to a deep change in how tgcf works.
from tgcf.
This error occurred again in tgcf new version.
You can check it's version,it is 0.1.27
from tgcf.
please don't use screenshots, copy and paste the error message.
are you using termux?
the poll object forwarding is happening smoothly in my computer. need to check for termux.
from tgcf.
Yes,I am using it in termux
ERROR:root:Cannot use <telethon.tl.types.MessageMediaPoll object at 0x713713a700> as file
Traceback (most recent call last):
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/tgcf/past.py", line 32, in forward_job
await send_message(client, destination, message)
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/tgcf/utils.py", line 8, in send_message
return await client.send_message(*args)
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/telethon/client/messages.py", line 782, in send_message
return await self.send_file(
File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/telethon/client/uploads.py", line 386, in send_file
raise TypeError('Cannot use {!r} as file'.format(file))
TypeError: Cannot use <telethon.tl.types.MessageMediaPoll object at 0x713713a700> as file
INFO:telethon.network.mtprotosender:Disconnecting from 149.154.175.59:443/TcpFull...
INFO:telethon.network.mtprotosender:Disconnection from 149.154.175.59:443/TcpFull complete!
from tgcf.
I got the same error in Heroku
ERROR:root:Cannot use <telethon.tl.types.MessageMediaPoll object at 0x7f1df78e0f10> as file
Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.9/site-packages/tgcf/past.py", line 34, in forward_job
await send_message(client, destination, message)
File "/app/.heroku/python/lib/python3.9/site-packages/tgcf/utils.py", line 8, in send_message
return await client.send_message(*args)
File "/app/.heroku/python/lib/python3.9/site-packages/telethon/client/messages.py", line 782, in send_message
return await self.send_file(
File "/app/.heroku/python/lib/python3.9/site-packages/telethon/client/uploads.py", line 386, in send_file
raise TypeError('Cannot use {!r} as file'.format(file))
TypeError: Cannot use <telethon.tl.types.MessageMediaPoll object at 0x7f1df78e0f10> as file
INFO:telethon.network.mtprotosender:Disconnecting from 149.154.175.59:443/TcpFull...
INFO:telethon.network.mtprotosender:Disconnection from 149.154.175.59:443/TcpFull complete!
from tgcf.
hi @ankit-sinha-18 , did you use official app to create the poll ? i could not reproduce this error.
try creating the poll with official app.
and what have you set to show_forwarded_from
? please show me your config file.
from tgcf.
As you can see ,that error is
ERROR:root:Cannot use <telethon.tl.types.MessageMediaPoll object at 0x7f1df78e0f10> as file
But ,in actual that is not Poll ,that is quiz.
When using tgcf
in past
mode,it couldn't forward quiz object
And program crashed at that time,
You can reproduce this error , make a quiz in from Channel and try to forward in another channel,you will get same error message, which I am getting.
from tgcf.
a quiz is a poll in quiz mode.
and after turning quiz mode on, I was able to reproduce the error. I cant do anything about it, because it is problem with telethon.
but what I can do, is prevent the stopping of script. it will show an error on terminal, and then continue with next message.
this error occurs for both past and live mode
from tgcf.
Yes, similar problem occurs in pyrogram also.
Quiz is forwarded as copy in pyrogram but it becomes Poll when it is copied. So this is another type of problem in pyrogram also.
Yes,you can do something to prevent the stopping of script and skip the quiz object
from tgcf.
Hi @ankit-sinha-18 , try forwarding quiz poll, with show_forwarded_from set to true.
(Read wiki)
Then it is supposed to work.
Try and tell me.
from tgcf.
But I don't need quiz as forwarded tag, I want them as a copy.
I know,It is not going to be forwarded without quote..
So, setting show_forwarded_from
true is the only way to bypass error in tgcf!!?
from tgcf.
hi @ankit-sinha-18, if there is an error, tgcf past mode will not stop. (show_forwarded_from can either be true or false)
but you cannot send a quiz poll object. you can only forward it. (becos telethon does not allow so)
send means = a fresh message is sent ("forwarded from" is not shown on top )
forward means = "forwarded from" is shown
from tgcf.
Related Issues (20)
- ERROR: Failed building wheel for Pillow
- docker image pull HOT 1
- desktop mode unable to scroll for new connections after 7 connections
- Plugin to prevent forwarding of recent duplicate messages
- Doesn't work for big channels HOT 12
- Setting Port Number HOT 6
- tgcf-web can't auto-start tgcf HOT 1
- tgcf update HOT 2
- The issue with activating the bot. HOT 1
- "tgcf-web" command gives this error on Mac HOT 4
- Set custom thumbnail to forwarded videos
- Autoforward not working with big channels with lots of subscribers. HOT 1
- Not working with python 3.12 HOT 3
- I can't run this program properly, can anyone help me?
- -bash: tgcf-web: command not found HOT 4
- Duplicate Message
- FloodWait
- streamlit throw error: `AttributeError: module 'streamlit.components' has no attribute 'v1'` HOT 2
- Session String HOT 2
- error Invalid object ID for a chat when trying to use chat IDs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tgcf.