|
import shutil |
|
import os |
|
|
|
try: |
|
print("Importing nltk files...") |
|
|
|
|
|
source_folder = '/home/user/app/nltk_data' |
|
destination_folder = '/home/user/nltk_data' |
|
|
|
|
|
os.makedirs(destination_folder, exist_ok=True) |
|
|
|
|
|
shutil.move(source_folder, destination_folder) |
|
|
|
print(f"NLTK folder moved to {destination_folder}") |
|
|
|
except FileNotFoundError as fnf_error: |
|
print(f"Error: Source folder not found. {fnf_error}") |
|
except PermissionError as perm_error: |
|
print(f"Error: Permission denied. {perm_error}") |
|
except Exception as e: |
|
print(f"An unexpected error occurred: {e}") |
|
|