Redmine can't get emails - redmine

I can't get work Redmine Helpdesk plugin. All settings are from its manual, the string is:
/usr/local/bin/rake -f /var/lib/redmine/Rakefile --silent redmine:email:receive_imap \
RAILS_ENV="production" \
host=myhost port=993 username=redmine password=mypass ssl=true \
project=test-proj1 folder=INBOX \
move_on_success=processed move_on_failure=failed \
no_permission_check=1 unknown_user=accept
I'm getting an error:
Net::IMAP::NoResponseError: The destination mailbox could not be found.
Although new emails in the mailbox mark as read.
I've modified the command and now I'm getting an error in production.log
An unexpected error occurred when receiving email: uninitialized constant MailHandler::HTML

Related

Receiving Invalid Grant Type Error Received From AWS Cognito When Supply Auth Code : How do I get Id and access tokens for testing?

I am unable to successfully acquire an id token/access token from my AWS cognito user pool when I supply an auth code. I have written a shell script (see below), and receive invalid_grant back from the server.
I have encoded the base64 Authorization Basic header for client_id:client_secret generated with python as:
import base64
encode='my_client_id_string:my_client_secret_string'
base64.b64encode(encode)
#!/usr/bin/env sh
curl --location --request POST 'https://<domain>.auth.us-east-2.amazoncognito.com/oauth2/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic <base64 encode string client_id:client_secret>' \
--data-urlencode 'grant_type=authorization_code' \
--data-urlencode 'client_id=<client_id from app settings' \
--data-urlencode 'code=<code received from redirect url to my localhost app endpoint>' \
--data-urlencode 'redirect_uri=http://localhost:8000/my_redirect'
Any ideas?
Solved it!
The problem was caused by an invalid client id. I had supplied a typo for the client id value!

getting `Unknown options` error when creating cognito-user-pool using aws cli

I tried to run following command to create a cognito-user-pool using aws cli.
aws.command(
`cognito-idp create-user-pool \
--pool-name TestUserPool \
--auto-verified-attributes email phone_number \
--policies PasswordPolicy={MinimumLength=integer,RequireUppercase=boolean,RequireLowercase=boolean,RequireNumbers=boolean,RequireSymbols=boolean,TemporaryPasswordValidityDays=integer} \
--alias-attributes email phone_number preferred_username \
--sms-verification-message 'Your authentication code for ${name} is {####}.' \
--email-verification-message 'Your authentication code for ${name} is {####}.' \
--email-verification-subject 'Your Verification Code for ${name}.' \
--verification-message-template DefaultEmailOption='CONFIRM_WITH_LINK' EmailMessageByLink='Please click the link below to verify your email address. {##Verify Email##}' EmailSubjectByLink='Your verification link' SmsMessage='Your authentication code for ${name} is {####}.' \
--sms-authentication-message 'Your authentication code for ${name} is {####}.' \
--mfa-configuration OPTIONAL \
--email-configuration EmailSendingAccount='DEVELOPER' SourceArn='arn:aws:ses:us-east-1:412***092:identity/***#***.com' From='***#***.com' ReplyToEmailAddress=***#***.com \
--sms-configuration SnsCallerArn='arn:aws:iam::412***092:role/service-role/test-SMS-Role', ExternalId='d611c8fd-0fd1-469a-a5ea-b02186042023' \
--admin-create-user-config AllowAdminCreateUserOnly=false InviteMessageTemplate={EmailMessage='Your username for ${name} is {username} and temporary password is {####}.' EmailSubject='Your temporary password for ${name}' SMSMessage='Your username for ${name}is {username} and temporary password is {####}.'} UnusedAccountValidityDays=7 \
--account-recovery-setting RecoveryMechanisms=[{Priority=1,Name=verified_email},{Priority=2,Name=verified_phone_number}] \
--device-configuration ChallengeRequiredOnNewDevice=true, DeviceOnlyRememberedOnUserPrompt=true`
).then(function (data) {
console.log('data=', data)
})
But I'm getting following error.
Unknown options: EmailSubjectByLink=Your verification link, SmsMessage=Your authentication code for tester is {####}., SourceArn=arn:aws:ses:us-east-1:412***092:***/***#***.com, From=***#***.com, ReplyToEmailAddress=***#***.com, ExternalId=d611c8fd-0fd1-469a-a5ea-b02186042023, InviteMessageTemplate={EmailMessage=Your username for tester is {username} and temporary password is {####}., EmailSubject=Your temporary password for tester, SMSMessage=Your username for testeris {username} and temporary password is {####}.}, UnusedAccountValidityDays=7, DeviceOnlyRememberedOnUserPrompt=true, EmailMessageByLink=Please click the link below to verify your email address. {##Verify Email##}
' stdout = '' stderr = 'usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:
aws help
aws <command> help
aws <command> <subcommand> help
What is wrong?

Use `capture_tpu_profile` in AI Platform

we are trying to capture TPU profiling data while running our training task on AI Platform. Following this tutorial. All needed information like TPU name getting from our model output.
config.yaml:
trainingInput:
scaleTier: BASIC_TPU
runtimeVersion: '1.15' # also tried '2.1'
task submitting command:
export DATE=$(date '+%Y%m%d_%H%M%S') && \
gcloud ai-platform jobs submit training "imaterialist_image_classification_model_${DATE}" \
--region=us-central1 \
--staging-bucket='gs://${BUCKET}' \
--module-name='efficientnet.main' \
--config=config.yaml \
--package-path="${PWD}/efficientnet" \
-- \
--data_dir='gs://${BUCKET}/tfrecords/' \
--train_batch_size=8 \
--train_steps=5 \
--model_dir="gs://${BUCKET}/algorithms_training/imaterialist_image_classification_model/${DATE}" \
--model_name='efficientnet-b4' \
--skip_host_call=true \
--gcp_project=${GCP_PROJECT_ID} \
--mode=train
When we tried to run capture_tpu_profile with name that our model got from master:
capture_tpu_profile --gcp_project="${GCP_PROJECT_ID}" --logdir='gs://${BUCKET}/algorithms_training/imaterialist_image_classification_model/20200318_005446' --tpu_zone='us-central1-b' --tpu='<tpu_IP_address>'
we got this error:
File "/home/kovtuh/.local/lib/python3.7/site-packages/tensorflow_core/python/distribute/cluster_resolver/tpu_cluster_resolver.py", line 480, in _fetch_cloud_tpu_metadata
"constructor. Exception: %s" % (self._tpu, e))
ValueError: Could not lookup TPU metadata from name 'b'<tpu_IP_address>''. Please doublecheck the tpu argument in the TPUClusterResolver constructor. Exception: <HttpError 404 when requesting https://tpu.googleapis.com/v1/projects/<GCP_PROJECT_ID>/locations/us-central1-b/nodes/<tpu_IP_address>?alt=json returned "Resource 'projects/<GCP_PROJECT_ID>/locations/us-central1-b/nodes/<tpu_IP_address>' was not found". Details: "[{'#type': 'type.googleapis.com/google.rpc.ResourceInfo', 'resourceName': 'projects/<GCP_PROJECT_ID>/locations/us-central1-b/nodes/<tpu_IP_address>'}]">
Seems like TPU device isn't connected to our project when provided in AI Platform, but what project is connected to and can we get an access to such TPUs to capture it's profile?

runtime_version versus runtime-version in cloudml-samples/flowers/sample.sh

In Google's sample code found at cloudml-samples/flowers/sample.sh, between lines 52 and 64, is the argument "runtime_version":
# Training on CloudML is quick after preprocessing. If you ran the above
# commands asynchronously, make sure they have completed before calling this one.
gcloud ml-engine jobs submit training "$JOB_ID" \
--stream-logs \
--module-name trainer.task \
--package-path trainer \
--staging-bucket "$BUCKET" \
--region us-central1 \
--runtime_version=1.0 \
-- \
--output_path "${GCS_PATH}/training" \
--eval_data_paths "${GCS_PATH}/preproc/eval*" \
--train_data_paths "${GCS_PATH}/preproc/train*"
Shouldn't "runtime_version" be replaced with "runtime-version" to avoid an error?
Yes. I've submitted a PR (in the future, never hesitate to do so yourself)

Multiple Photos upload on Facebook

Is there any way to upload multiple photos together on facebook...
I have uploaded a single photo at a time using GraphAPI....but not multiple...
Please suggest...
Thanks...
You need to place a "batched" request to the Graph API. This is documented here: https://developers.facebook.com/docs/reference/api/batch/ (check out the paragraph "Uploading binary data"). Basically it's a cURL call where you json encode an array containing all the "batched" requests ("batch=[json array of calls]"). For some good reson Facebook limits your array to 20 requests. It translates pretty nicely to the PHP cURL methods, if you've got cURL enabled on your server...
curl
–F 'access_token=…' \
-F 'batch=[{"method":"POST", \
"relative_url":"me/photos", \
"body":"message=My cat photo" \
"attached_files":"file1" \
},
{"method":"POST", \
"relative_url":"me/photos", \
"body":"message=My dog photo" \
"attached_files":"file2" \
},
]’
-F 'file1=#cat.gif' \
-F 'file2=#dog.jpg' \
https://graph.facebook.com
UPDATE: replaced “ with " and ‘ with '