TypeError: Updater.__init__() got an unexpected keyword argument 'use_context' - python-telegram-bot

It occurred when I perform this :
updater = Updater('5502935975:AAGcE8wtPOUMXVCOI3PXr0fygpXsdaEn-HI', use_context=True)
Many Thanks!

You should revoke the token that you just posted. Also double check which version of python-telegram-bot you are using and followng the resources that PTB provides for that version.
Disclaimer: I'm currently the maintainer of python-telegram-bot.

"Down grade" or "upgrade" the python-telegram-bot to the relevant version , e.g i downgraded by using "pip install python-telegram-bot==13.7" from the lastest python-telegram-bot 20.0 version, and it worked for me,
NOTE: my version might be different from yours so use the right version that wont call the error

Related

gatsby new command error "TypeError: rd.cursorTo is not a function"

Im creating a new site using the command gatsby new and im getting the following error
Cloning site template C:\Users\catal\AppData\Roaming\npm\node_modules\gatsby-cli\node_modules\yoga-layout-prebuilt\yoga-layout\build\Release\nbind.js:53
throw ex;
^
TypeError: rd.cursorTo is not a function
at Timeout._onTimeout (C:\Users\catal\AppData\Roaming\npm\node_modules\gatsby-cli\node_modules\create-gatsby\lib\index.js:5:852)
at listOnTimeout (node:internal/timers:564:17)
at processTimers (node:internal/timers:507:7)
Node.js v18.7.0
Im using windows 11
That was reported in gatsbyjs/gatsby issue 35426 in last April (2022), for now without conclusive resolution.
Try the create-gatsby locally first, following its readme, to check if this is a version issue (although node minimum version was set to 10).
If possible, try it also in a Linux WSL2 (for instance Ubuntu) VM, in order to check if this is related to the OS.
Upgrading my python version to latest fixed the issue for me.

Why the "tidyverse" package cannot be installed in R?

The Warnings are shown as the picture in this link. And my R version is most updated 4.1.0
In the error message, it shows that you do not have rtools installed. You can follow the link and follow the instructions to install rtools.
https://cran.rstudio.com/bin/windows/Rtools/rtools40.html
Then, you can restart R and try again with tidyverse.
If you still have issues with tidyverse from CRAN, then you can try installing the package from GitHub.
install.packages("devtools")
devtools::install_github("tidyverse/tidyverse")

Why pastebinit is not available via pip?

I got this error messsage.
$ pip install pastebinit
ERROR: Could not find a version that satisfies the requirement pastebinit (from versions: none)
ERROR: No matching distribution found for pastebinit
But according to the following URL. It should be available. Does anybody know what is wrong? Thanks.
https://libraries.io/pypi/pastebinit
There is no such project available on PyPI currently: https://pypi.org/project/pastebinit/
libraries.io is not an authoritative source. It also shows no currently available release for this project anyway: https://libraries.io/pypi/pastebinit/versions
The forge for this software seems to be here: https://launchpad.net/pastebinit
Nop, it's not there. The URL https://pypi.org/project/pastebinit/ returns error 404. Perhaps it was there but later was removed.

React Native _weakMap2 error

I just updated to React Native 0.21, but I am getting an error when I require Parse:
var Parse = require('parse/react-native').Parse;
The error I get is:
undefined is not a constructor (evaluating 'new _weakMap2.default()')
I don't believe it has to do with Parse though, as searching the directory, the 'weakMap2' reference is only found inside the react-proxy package.
Has anyone else experienced this error or found a workaround? Thanks!
This should be fixed in react-proxy#1.1.7.
(Don’t use 2.x, it’s not related to React Native at all currently!)
You can run npm install react-proxy#1.1.7 so NPM updates it locally. If you are using npm#2.x, you would need to run npm install react-proxy#1.1.7 inside node_modules/react-native/node_modules/react-transform-hmr or something like this—check where it is installed and make sure it’s 1.x but up to date.
Don't really know the issue but running Parse JS SDK as version 1.6.14 works for me. Have the same error as you when running latest 1.7.1. Hard to trace the error.
npm i parse#1.6.14 --save
I forced react-proxy to version 2.0.1 and the error is now gone for me.

Zend Framework: Undefined class constant 'MYSQL_ATTR_INIT_COMMAND'

As you may have known that I switched from ubuntu to windows from my previous questions. I was working on Zend Framework on ubuntu and now working on same project in windows. Because of this switching I am facing some problems in windows which was not occurred in ubuntu.
Now I have the following error in firebug console when I go to login page:
<b>Fatal error</b>: Undefined class constant 'MYSQL_ATTR_INIT_COMMAND' in <b>C:\wamp\www\vcred\library\Zend\Db\Adapter\Pdo\Mysql.php</b> on line <b>93</b><br />
Do you people know that what type of error is this and what is the solution?
I have the following configuration for database.
resources.db.adapter = "Pdo_Mysql"
resources.db.params.host = "localhost"
resources.db.params.username = "root"
resources.db.params.password = ""
resources.db.params.dbname = "test"
resources.db.params.charset = "utf8"
Thanks
I just had the same error with PHP 5.2.6, and all I had to do is to open php.ini (e.g. on Windows: C:\Windows\php.ini, or on Ubuntu: /etc/php5/apache2/php.ini or sg. like this) in a text editor, and remove the semicolon from the following line:
;extension=php_pdo_mysql.dll
So as a result it would look like this in php.ini:
extension=php_pdo_mysql.dll
That solved my problem.
This looks related to this bug on PHP's bugtracker : Bug #47224 MYSQL_ATTR_INIT_COMMAND is no longer available
It seems it's been fixed in SVN -- but maybe not in the version of PHP you are using ?
Quoting one of the comments :
[2009-07-02 06:43 UTC] mg at artigo
dot pl A temporary solution is to
use INT value (1002) instead of
constant.
This might be a temporary solution, until you install a new version of PHP, in which the bug is fixed ?
Looks like a Windows bug in PHP 5.3 that was fixed in SVN a while ago. You might want to try updating to the latest PHP release to see if the issue still exists.
I got the same error, on debian6, when I had not yet installed php-mysql so, I simply installed this, like this
apt-get install php5-mysql
/etc/init.d/apache2 restart
I just add it here, in case other have same problem, to save them them a few minutes of research.

Resources