FailedPreconditionError: . is not a directory
@Floppa2003,
I was facing a different issue while executing the mentioned code on tensorflow v2.12. Kindly find the gist of it [here](https://colab.research.google.com/gist/tilakrayal/994769068436f60d1fa7f990e16190db/untitled1174.ipynb) and provide the dependencies. 

Generally the error typically indicates that the system is not in state to execute the operation and requires preconditions to be met before successfully executing current operation.
https://www.tensorflow.org/api_docs/python/tf/errors/FailedPreconditionError


Thank you! > @Floppa2003, I was facing a different issue while executing the mentioned code on tensorflow v2.12. Kindly find the gist of it [here](https://colab.research.google.com/gist/tilakrayal/994769068436f60d1fa7f990e16190db/untitled1174.ipynb) and provide the dependencies. Thank you!

Sorry, I solved the problem already. Turns out that tensorflow doesn't support non-english letters in directory paths. Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60682">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60682">No</a>

Good evening. I am trying to use Hyperband Tuner from keras_tuner, bet when I try to use it I get a FailedPreconditionError while creating the tuner.

-   **Have I written custom code (as opposed to using a stock example script
    provided in TensorFlow)**: no
-   **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: Windows 10* 64-bit
-   **TensorFlow installed from (source or binary)**: pip install tensorflow in command line
-   **TensorFlow version (use command below)**: 2.12.0
-   **Python version**: 3.11.3
-   **Exact command to reproduce**:

`import tensorflow as tf
import keras_tuner
print(tf.version.GIT_VERSION, tf.version.VERSION)

def hyperband_objective_autoencoder():
    return 1

hyperband_tuner = keras_tuner.Hyperband(
    hypermodel = hyperband_objective_autoencoder
)`

Output:

`v2.12.0-rc1-12-g0db597d0d75 2.12.0
---------------------------------------------------------------------------
FailedPreconditionError                   Traceback (most recent call last)
Cell In[1], line 8
      5 def hyperband_objective_autoencoder():
      6     return 1
----> 8 hyperband_tuner = keras_tuner.Hyperband(
      9     hypermodel = hyperband_objective_autoencoder
     10 )

File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\keras_tuner\tuners\hyperband.py:418, in Hyperband.__init__(self, hypermodel, objective, max_epochs, factor, hyperband_iterations, seed, hyperparameters, tune_new_entries, allow_new_entries, max_retries_per_trial, max_consecutive_failed_trials, **kwargs)
    391 def __init__(
    392     self,
    393     hypermodel=None,
   (...)
    404     **kwargs
    405 ):
    406     oracle = HyperbandOracle(
    407         objective,
    408         max_epochs=max_epochs,
   (...)
    416         max_consecutive_failed_trials=max_consecutive_failed_trials,
    417     )
--> 418     super().__init__(oracle=oracle, hypermodel=hypermodel, **kwargs)

File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\keras_tuner\engine\tuner.py:113, in Tuner.__init__(self, oracle, hypermodel, max_model_size, optimizer, loss, metrics, distribution_strategy, directory, project_name, logger, tuner_id, overwrite, executions_per_trial, **kwargs)
    105 if hypermodel is None and self.__class__.run_trial is Tuner.run_trial:
    106     raise ValueError(
    107         "Received `hypermodel=None`. We only allow not specifying "
    108         "`hypermodel` if the user defines the search space in "
    109         "`Tuner.run_trial()` by subclassing a `Tuner` class without "
    110         "using a `HyperModel` instance."
    111     )
--> 113 super().__init__(
    114     oracle=oracle,
    115     hypermodel=hypermodel,
    116     directory=directory,
    117     project_name=project_name,
    118     logger=logger,
    119     overwrite=overwrite,
    120     **kwargs,
    121 )
    123 self.max_model_size = max_model_size
    124 self.optimizer = optimizer

File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\keras_tuner\engine\base_tuner.py:126, in BaseTuner.__init__(self, oracle, hypermodel, directory, project_name, overwrite, **kwargs)
    123 self.tuner_id = os.environ.get("KERASTUNER_TUNER_ID", "tuner0")
    125 # Reloading state.
--> 126 if not overwrite and tf.io.gfile.exists(self._get_tuner_fname()):
    127     tf.get_logger().info(
    128         f"Reloading Tuner from {self._get_tuner_fname()}"
    129     )
    130     self.reload()

File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\keras_tuner\engine\base_tuner.py:473, in BaseTuner._get_tuner_fname(self)
    472 def _get_tuner_fname(self):
--> 473     return os.path.join(str(self.project_dir), f"{str(self.tuner_id)}.json")

File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\keras_tuner\engine\base_tuner.py:464, in BaseTuner.project_dir(self)
    461 @property
    462 def project_dir(self):
    463     dirname = os.path.join(str(self.directory), self.project_name)
--> 464     utils.create_directory(dirname)
    465     return dirname

File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\keras_tuner\utils.py:46, in create_directory(path, remove_existing)
     43 def create_directory(path, remove_existing=False):
     44     # Create the directory if it doesn't exist.
     45     if not tf.io.gfile.exists(path):
---> 46         tf.io.gfile.makedirs(path)
     48     # If it does exist, and remove_existing is specified,
     49     # the directory will be removed and recreated.
     50     elif remove_existing:

File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\tensorflow\python\lib\io\file_io.py:513, in recursive_create_dir_v2(path)
    501 @tf_export("io.gfile.makedirs")
    502 def recursive_create_dir_v2(path):
    503   """Creates a directory and all parent/intermediate directories.
    504 
    505   It succeeds if path already exists and is writable.
   (...)
    511     errors.OpError: If the operation fails.
    512   """
--> 513   _pywrap_file_io.RecursivelyCreateDir(compat.path_to_bytes(path))

FailedPreconditionError: . is not a directory
`

