BATCH File Stops Working After Installing Pyenv for Windows

I have a BATCH file that automatically runs my Birthday Pokemon generator indefinitely. It was working fine until I installed Pyenv to down grade my Python to 3.8.10 temporarily to install a specfic module. After reinstalling all the required modules using PIP, the BATCH file stopped looping.

The BATCH file is below, and under is the initial script.


@echo off

python Pokemon.py

:loop
if %ERRORLEVEL% == 0 (
    python Pokemon.py
) else (
    echo Exited with code: %ERRORLEVEL%
    pause
)
goto loop

Pokemon Generator:

#Imports
import pypokedex
import pypokedex.exceptions
import datetime
import os
import json
import random

#Code
birthDate: str = input("Input your birth date n")
birthMonth: str = input("Input your birth month n")
birthYear: str = input("Input your birth year n")
today: datetime.date = datetime.date.today()

year: int = today.year

asking: bool = True

currentDir = os.path.dirname(__file__)
pokemonJson: str = os.path.join(currentDir, "AmountOfPokemon.json")

with open(pokemonJson, "r") as file:
    pokemonData: dict[str, str] = json.load(file)

while asking:
    if len(birthMonth) == 0 or len(birthMonth) > 2 or not birthMonth.isdigit():
        print("input valid birth date.")
        birthDate = input("Input your birth date n")

    if len(birthDate) == 0 or len(birthDate) > 2 or not birthDate.isdigit():
        print("input valid birth date.")
        birthMonth = input("Input your birth month n")

    if len(birthYear) != 4 or not birthYear.isdigit():
        print("input valid birth date.")
        birthYear = input("Input your birth year n")

    if birthDate.isdigit() and int(birthDate) > 31:
        print("input valid birth date.")
        birthDate = input("Input your birth date n")

    if birthMonth.isdigit() and int(birthMonth) > 12:
        print("input valid birth month.")
        birthDate = input("Input your birth month n")

    if birthYear.isdigit() and int(birthYear) > year:
        print("input valid birth year.")
        birthYear = input("Input your birth year n")

    if (len(birthMonth) != 0 or len(birthMonth) <= 2 or birthMonth.isdigit()) and (birthDate.isdigit() and int(birthDate) <= 31) and (birthMonth.isdigit() and int(birthMonth) <= 12) and (birthYear.isdigit() and int(birthYear) <= year):
        asking = False

pokemonNumber = 0

operation = random.randint(1, 2)
number: int = random.randint(1, 50)

if operation == 1:
    pokemonNumber = round( int(birthYear) / (int(birthMonth) + int(birthDate))) + number
elif operation == 2:
    pokemonNumber = round( int(birthYear) / (int(birthMonth) + int(birthDate))) - number

def getPokemonNumber() -> tuple[int, str]:
    global pokemonNumber
    
    print(pokemonNumber)

    if pokemonNumber <= 0 or pokemonNumber > 1025:
        pokemonNumber = 0
        pokemon = "Missingno"
        return pokemonNumber, pokemon
    
    if int(birthMonth) == 7 and int(birthDate) == 1:
        pokemonNumber = 399
        pokemon = "Bidoof"
        return pokemonNumber, pokemon

    try:
        pokemon: pypokedex.Pokemon | str = pypokedex.get(dex=pokemonNumber)
    except pypokedex.exceptions.PyPokedexError:
        pokemon = pokemonData[str(pokemonNumber)] #If getting the POkemon fails due to a network error, fall back to using the JSON file.
    
    if isinstance(pokemon, pypokedex.Pokemon):
        return pokemon.dex, pokemon.name.capitalize()
    else:
        return pokemonNumber, pokemon.capitalize()

playersPokemon: str = getPokemonNumber()[1]
pokemonsNumber: int = getPokemonNumber()[0]

print(f"Your Pokémon is #{pokemonsNumber}: {playersPokemon}, based on your birthday.")

I’ve tried adding a pause at the end of the script. However, pause does not work anymore in BATCH files after installing Pyenv.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật