Chilkat "Cannot get ActiveX Interface" - autoit

When I use this snippets:
Local $oTask = $oHttp.DownloadBdAsync("https://.............pl/..........", $oBinData)
ConsoleWrite($oHttp.LastErrorText)
I get this error:
ChilkatLog:
ActiveXError:
DllDate: Sep 28 2020
ChilkatVersion: 9.5.0.84
UnlockPrefix: ************
Architecture: Little Endian; 32-bit
Language: ActiveX
VerboseLogging: 0
Cannot get ActiveX Interface
--ActiveXError
--ChilkatLog
Why I get this error ?
btw.
Local $iSuccess = $oHttp.DownloadBd("https://.............pl/..........", $oBinData)
ConsoleWrite($oHttp.LastErrorText)
Works fine

I don't know if this is correct, but in other languages the "Set" keyword would be needed if an object is returned instead of a primitive value. Given that a Chilkat async method returns a Chilkat Task object (https://chilkatsoft.com/refdoc/xChilkatTaskRef.html) perhaps this is the solution:
Local $oTask
Set $oTask = $oHttp.DownloadBdAsync("https://.............pl/..........", $oBinData)
This is just a guess...

Related

How to avoid RuntimeError while call __dict__ on module?

it is appearing in some big modules like matplotlib. For example expression :
import importlib
obj = importlib.import_module('matplotlib')
obj_entries = obj.__dict__
Between runs len of obj_entries can vary. From 108 to 157 (expected) entries. Especially pyplot can be ignored like some another submodules.
it can work stable during manual debug mode with len computing statement after dict extraction. But in auto it dont work well.
such error occures:
RuntimeError: dictionary changed size during iteration
python-BaseException
using clear python 3.10 on windows. Version swap change nothing at all
during some attempts some interesting features was found.
use of repr is helpfull before dict initiation.
But if module transported between classes like variable more likely lazy-import happening? For now there is evidence that not all names showing when command line interpriter doing opposite - returning what expected. So this junk of code help bypass this bechavior...
Note: using pkgutil.iter_modules(some_path) to observe modules im internal for pkgutil ModuleInfo form.
import pkgutil, importlib
module_info : pkgutil.ModuleInfo
name = module_info.name
founder = module_info.module_finder
spec = founder.find_spec(name)
module_obj = importlib.util.module_from_spec(spec)
loader = module_obj.__loader__
loader.exec_module(module_obj)
still unfamilliar with interior of import mechanics so it will be helpfull to recive some links to more detail explanation (spot on)

Reticulate AWS Cogntito

This is my Python code (that I've checked and it works):
from warrant.aws_srp import AWSSRP
def auth(USERNAME,PASSWORD):
client = boto3.client('cognito-idp',region_name=region_name)
aws = AWSSRP(username=USERNAME, password=PASSWORD, pool_id=POOL_ID,
client_id=CLIENT_ID,client=client)
try:
tokens = aws.authenticate_user()
return(tokens)
except Exception as e:
return(e)
I'm working with R in order to create a visual interface for doing some operation (including this one) and it is a requirement.
I use the reticulare R package to execute Python code. I tested it with some dummy code in order to check the correct functioning (and it is okay).
When i execute the above function by running:
reticulate::source_python(FILE_PATH)
py$auth(USERNAME,PASSWORD)
i get the following error:
An error occurred (InvalidParameterException) when calling the RespondToAuthChallenge operation: TIMESTAMP format should be EEE MMM d HH:mm:ss z yyyy in english.
I tried to search a lot but I found nothing, I suppose that can exist a sort of wrapper or formatter. Maybe someone as already face this problem...
Thank a lot of any help.

SQLiteAsyncConnection -> CreateTablesAsync<T>() requires two type arguments

OS/X Mac Xamarin Forms Visual Studio Pro 2017
I'm trying to follow the wonderful course by Mosh Hamedani on Xamarin forms. I try to write the same code from lecture 89:
var connection = DependencyService.Get<ISQLiteDb>().GetConnection();
connection.CreateTablesAsync<Recipe>();
But... I get the error:
Using the generic method ... CreateTablesAsync < t1 , t2 > () requires 2
type arguments
But even the Xamarin documentation doesn't say that! It only shows one type argument of the table class type that you want the table to be created as.
How do I solve this?
CreateTablesAsync<T1,T2> requires 2 type arguments.
CreateTableAsync<T1> only requires 1 type argument.
You likely have a typo - remove the "s"

MSDeploy 3 and dbDacFx not recognizing parameters it claims it supports. Am I missing something?

Here is my commandline:
msdeploy.exe -verb:sync -Source:dbDacFx="C:\MyDB.dacpac" -dest:dbDacFx="Data Source=myserver;Database=MyDB;userid=myuser;password=secret",wmsvc="https://www.myserver.com",username=myotheruser,password=anothersecret,BlockOnPossibleDataLoss="False" -verbose
The presence of that BlockOnPossibleDataLoss parameter causes this error:
Error Code: 109
More Information:
Error: Exception has been thrown by the target of an invocation.
Error: Provider 'dbDacFx' does not support setting 'BlockOnPossibleDataLoss'.
Error count: 1.
If I take it out the BlockOnPossibleDataLoss parameter, it works fine.
If I put in a garbage setting like this:
msdeploy.exe -verb:sync -Source:dbDacFx="C:\MyDB.dacpac" -dest:dbDacFx="Data Source=myserver;Database=MyDB;userid=myuser;password=secret",wmsvc="https://www.myserver.com",username=myotheruser,password=anothersecret,asdfghjkl="False" -verbose
I get this error message:
Error: The provider 'dbDacFx' does not support the 'asdfghjkl' setting. Supporte
d settings are (dropDestinationDatabase, dacpacAction, includeData, commandTimeo
ut, AllowDropBlockingAssemblies, AllowIncompatiblePlatform, BackupDatabaseBefore
Changes, BlockOnPossibleDataLoss, BlockWhenDriftDetected, CommentOutSetVarDeclar
ations, CompareUsingTargetCollation, CreateNewDatabase, DeployDatabaseInSingleUs
erMode, DisableAndReenableDdlTriggers, DoNotAlterChangeDataCaptureObjects, DoNot
AlterReplicatedObjects, DropConstraintsNotInSource, DropDmlTriggersNotInSource,
DropExtendedPropertiesNotInSource, DropIndexesNotInSource, DropObjectsNotInSourc
e, DropPermissionsNotInSource, DropRoleMembersNotInSource, GenerateSmartDefaults
, IgnoreAnsiNulls, IgnoreAuthorizer, IgnoreColumnCollation, IgnoreComments, Igno
reCryptographicProviderFilePath, IgnoreDdlTriggerOrder, IgnoreDdlTriggerState, I
gnoreDefaultSchema, IgnoreDmlTriggerOrder, IgnoreDmlTriggerState, IgnoreExtended
Properties, IgnoreFileAndLogFilePath, IgnoreFilegroupPlacement, IgnoreFileSize,
IgnoreFillFactor, IgnoreFullTextCatalogFilePath, IgnoreIdentitySeed, IgnoreIncre
ment, IgnoreIndexOptions, IgnoreIndexPadding, IgnoreKeywordCasing, IgnoreLockHin
tsOnIndexes, IgnoreLoginSids, IgnoreNotForReplication, IgnoreObjectPlacementOnPa
rtitionScheme, IgnorePartitionSchemes, IgnorePermissions, IgnoreQuotedIdentifier
s, IgnoreRoleMembership, IgnoreRouteLifetime, IgnoreSemicolonBetweenStatements,
IgnoreTableOptions, IgnoreUserSettingsObjects, IgnoreWhitespace, IgnoreWithNoche
ckOnCheckConstraints, IgnoreWithNocheckOnForeignKeys, IncludeCompositeObjects, I
ncludeTransactionalScripts, NoAlterStatementsToChangeClrTypes, PopulateFilesOnFi
leGroups, RegisterDataTierApplication, RunDeploymentPlanExecutors, ScriptDatabas
eCollation, ScriptDatabaseCompatibility, ScriptDatabaseOptions, ScriptDeployStat
eChecks, ScriptFileSize, ScriptNewConstraintValidation, ScriptRefreshModule, Tre
atVerificationErrorsAsWarnings, UnmodifiableObjectWarnings, VerifyCollationCompa
tibility, VerifyDeployment, authType, computerName, encryptPassword, includeAcls
, password, prefetchPayload, userName, wmsvc).
Error count: 1.
Note that it includes BlockOnPossibleDataLoss as one of the supported settings in the error message about not supporting some other garbage parameter. This is totally contradictory. Further, if you simply ask the dbDacFx provider what it supports:
msdeploy.exe -Help -Source:dbDacFx
It lists a host of settings, including:
Provider Setting: BlockOnPossibleDataLoss
A true or false value for the 'BlockOnPossibleDataLoss'
setting.
I understand from reading about dbDacFx and many other users frustrated at its incompleteness that it has been "undercooked". But this is the first time I've realized how absurd the situation is where it reports that it doesn't support a specific parameter, yet lists it among the parameters it supports.
Will this be fixed, or should I discard dbDacFx? Am I missing something?

Passing parameters in .jcall

I have just started working with rJava to utilise a host of Java code in an R based application. I've tried some simple "Hello world" type things so I know the basic setup is working. I have several issues however I am hoping they will be resolved if I can resolve this basic problem using .jcall.
> cal = new(J("java/util/GregorianCalendar"))
> obj = new(J("au.gov.ips.dataarchive.TIndex"))
> obj$monthlyT(cal)
[1] 77
> .jcall(obj,"I","monthlyT",cal)
Error in .jcall(obj, "I", "monthlyT", cal) :
method monthlyT with signature (Ljava/util/GregorianCalendar;)I not found
To my understanding, the 3rd and 4th lines are equivalent and should produce the same result. Clearly I am doing something wrong. The 'monthlyT' method is defined in the java code as:
static public Integer monthlyT(Calendar month)
I am not a Java expert, so please let me know what other info about the Java objects I might need to provide to answer the question.
cal is a java.util.GregorianCalendar and not a java.util.Calendar. If you want to use the low-level .jcall interface (why?) then you need to do the casting yourself. So something like this:
.jcall(obj,"I","monthlyT",.jcast(cal, "java/util/Calendar" ))

Resources