Facing issues with using Openpgp library - openpgp

I downloaded the OpenPGP example code mentioned in question How do you use the PHP OpenPGP library?.
I faced following error when I tried to access keygen.php:
Fatal error: Call to undefined method OpenPGP_Message::signature_and_data() in D:\official\data\sites\openpgp\lib\openpgp_crypt_rsa.php on line 145
Infact, none of three is working. Can you please explain how to fix these issues?

I guess that line 148 in https://github.com/singpolyma/openpgp-php/blob/master/lib/openpgp_crypt_rsa.php
must be corrected from:
$sig = $packet->signature_and_data();
to:
$sig = $packet->signatures();

Related

TypeError: from_pretrained() got an unexpected keyword argument 'file_name'

I'm trying to quantize a seq2seq model (M2M100) using optimum library provided by Huggingface. As per this guide, I'm trying to quantize the encoder and decoder one by one but that requires me to overwrite the model name. Following the documentation in the guide, I used the code:
encoder_quantizer = ORTQuantizer.from_pretrained(model_dir, file_name="encoder_model.onnx")
This code is throwing the following error:
TypeError: from_pretrained() got an unexpected keyword argument 'file_name'
I tried examining ORTQuantizer.from_pretrained and got the following:
<function optimum.onnxruntime.quantization.ORTQuantizer.from_pretrained(model_name_or_path: Union[str, os.PathLike], feature: str, opset: Optional[int] = None) -> 'ORTQuantizer'>
Clearly, from_pretrained here doesn't have a file_name parameter as has been indicated in the guide. Can someone please help me debug this error? Thanks!
Posting the solution I found while exploring optimum GitHub repo. The problem is that installing optimum via pip is downloading v1.3 which did not have the fix for quantizing seq2seq models. Instead install the package directly from GitHub using the command below. It worked fine afterwards.
python -m pip install git+https://github.com/huggingface/optimum.git

Fatal error: Call to undefined method ModulesHelper::getActions()

When I create new module using Roksproket, I get:
Fatal error: Call to undefined method ModulesHelper::getActions() in C:\xampp\htdocs\pgocaribbeantv\administrator\components\com_roksprocket\views\module\view.html.php on line 139
What might the problem be?
This is a known issue with Joomla 3.2.2, the getActions function was meant to be depreciated and then removed.
https://github.com/joomla/joomla-cms/pull/3061
For now you can try upgrading RockSprocket as they added a release to work around the bug (see their changelog):
http://www.rockettheme.com/joomla/extensions/roksprocket

Doctrine command line create schema

My first time using Doctrine + CodeIgniter and trying to use orm:schema-tool:create command I get this error message:
C:\>C:\xampp\php\php.exe c:\xampp\htdocs\doctrine\application\doctrine.php orm:schema-tool:create
Fatal error: Call to undefined function Doctrine\Common\Cache\apc_fetch() in C:\xampp\htdocs\doctrine\application\libraries\Doctrine\Common\Cache\ApcCache.php on line 52
What am I doing wrong?
Thanks in advance for any help.
I've found the solution, it was pretty obvious.
On my Doctrine.php I had a line trying to use cache using APC and I don't have APC installed...commented those lines and problem solved.
Hope it helps.

CodeIgniter "No input file specified"

I just finished developing a website using codeigniter and in the end the person I was developing for switched from one hosting service to another. Now, when I try to go in the website at first I got a message saying
"No input file specified"
after going through some websites I found out I could try and fix this by using index.php? changing these on the config.php file:
$config['index_page'] = "index.php?";
$config['uri_protocol'] = "QUERY_STRING";
I tried that but now I am getting this message:
A PHP Error was encountered
Severity: Notice
Message: Undefined property:
Login::$session
Filename: controllers/login.php
Line Number: 121
Fatal error: Call to a member function
userdata() on a non-object in
/home/content/34/5024634/html/pdv/application/controllers/login.php
on line 121
on line 121 of controllers/login.php you see this:
if ($this->session->userdata('logged_in') == TRUE)
which works perfectly fine on the old server as well as on localhost. Now, going back to the previous host isn't an option according to my client so I've been stuck with this error for a while now and haven't been able to find any solution, would any of you guys know how to fix this?
The most helpful websites I've checked out are these two:
http://anon83.wordpress.com/2007/12/11/codeigniter-vs-godaddy-problems/
http://codeigniter.com/wiki/Godaddy_Installaton_Tips/
You probably forgot to load your session library
$this->load->library('session'); in your construct or autoload it.

Fatal error in joomla site?

after uploading a file in joomla site this error come
Fatal error: Cannot call overloaded function for non-object in /webcorp1/www/corpusers/p/u/punjabtourism.gov.in/libraries/joomla/utilities/simplexml.php on line 607
Fatal error: Class 'JLoader' not found in /webcorp1/www/corpusers/p/u/punjabtourism.gov.in/libraries/loader.php on line 161
anybody have solution please help
Disable caching and see if that helps the problem - or, if you're using APC caching, then switch to just simple file caching.

Resources