C++ Gameplay Ability system Error on effect duration 5.4

UGameplayEffect::INSTANT_APPLICATION || Spec.GetPeriod() != UGameplayEffect::NO_PERIOD) is the error I receive for this code implementation.

if(UInventoryComponent* Inventory = GetInventoryComponent())
	{
		if(WeaponStaticData->CurrentMagazineSize < WeaponStaticData->MaxMagazineSize && Inventory->GetInventoryTagCount(WeaponStaticData->AmmoTag) > 0)
		{
			
			if (UAbilitySystemComponent* AbilityComponent = GetAbilitySystemComponentFromActorInfo())
			{
				
					FGameplayEffectContextHandle EffectContext = AbilityComponent->MakeEffectContext();
					FGameplayEffectSpecHandle OutSpec = AbilityComponent->MakeOutgoingSpec(UGE_Reload::StaticClass(), 1, EffectContext);
					if (OutSpec.IsValid())
					{
						FGameplayEffectSpec* Spec = OutSpec.Data.Get();
						Spec->DynamicGrantedTags.AddTag(FGameplayTag::RequestGameplayTag(TEXT("State.Reloading")));
						//Spec->Def->DurationPolicy = EGameplayEffectDurationType::HasDuration;
						Spec->SetDuration(WeaponStaticData->TimeToReloadFinish, true);
						
						ReloadEffectHandle = AbilityComponent->ApplyGameplayEffectSpecToSelf(*Spec);
					
					}

and the UGE_Reload class has this defined

void UGE_Reload::UMyReloadingGameplayEffect()
{
DurationPolicy = EGameplayEffectDurationType::HasDuration;

DurationMagnitude = FScalableFloat(1.0f); 

}

why am I getting this error?