Repository: great-expectations/great_expectations

Issue:
When starting the data assistant: TypeError: __init__() missing 1 required positional argument: 'data_asset_name'
**Describe the bug**
I get an error message when I choose the data assistant:
`TypeError: __init__() missing 1 required positional argument: 'data_asset_name'`


**To Reproduce**
I run "great_expectations suite new"
then I choose to use the data assistant (3)

I directly get the error message.

I have a feeling that the setup tool is not using special character the right way (french accents éèà etc.)
but I'm not sure how to track the issue based on the error message.

**Expected behavior**
Data assistant asks which file to use or throw an error that is clear about the issue

**Environment (please complete the following information):**
 - Operating System: Windows
 - Great Expectations Version: 0.15.43

**Additional context**
full error message:
```(venv Python) PS C:\Users\XXXX\OneDrive - YYYY\Documents\Project\Jupyter> great_expectations suite new
Using v3 (Batch Request) API

How would you like to create your Expectation Suite?
    1. Manually, without interacting with a sample Batch of data (default)
    2. Interactively, with a sample Batch of data
    3. Automatically, using a Data Assistant
: 3

A batch of data is required to edit the suite - let's help you to specify it.

Traceback (most recent call last):
  File "c:\program files\python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\program files\python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\XXXX\OneDrive - YYYY\Documents\Project\venv Python\Scripts\great_expectations.exe\__main__.py", line 7, in <module>
  File "C:\Users\XXXX\OneDrive - YYYY\Documents\Project\venv Python\lib\site-packages\great_expectations\cli\cli.py", line 198, in main
    cli()
  File "C:\Users\XXXX\OneDrive - YYYY\Documents\Project\venv Python\lib\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\XXXX\OneDrive - YYYY\Documents\Project\venv Python\lib\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "C:\Users\XXXX\OneDrive - YYYY\Documents\Project\venv Python\lib\site-packages\click\core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\XXXX\OneDrive - YYYY\Documents\Project\venv Python\lib\site-packages\click\core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\XXXX\OneDrive - YYYY\Documents\Project\venv Python\lib\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\XXXX\OneDrive - YYYY\Documents\Project\venv Python\lib\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\XXXX\OneDrive - YYYY\Documents\Project\venv Python\lib\site-packages\click\decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "C:\Users\XXXX\OneDrive - YYYY\Documents\Project\venv Python\lib\site-packages\great_expectations\cli\suite.py", line 151, in suite_new   
  File "C:\Users\XXXX\OneDrive - YYYY\Documents\Project\venv Python\lib\site-packages\great_expectations\cli\suite.py", line 335, in _suite_new_workflow
    raise e
  File "C:\Users\XXXX\OneDrive - YYYY\Documents\Project\venv Python\lib\site-packages\great_expectations\cli\suite.py", line 268, in _suite_new_workflow
    suite: ExpectationSuite = toolkit.get_or_create_expectation_suite(
  File "C:\Users\XXXX\OneDrive - YYYY\Documents\Project\venv Python\lib\site-packages\great_expectations\cli\toolkit.py", line 94, in get_or_create_expectation_suite
    default_expectation_suite_name: str = get_default_expectation_suite_name(
  File "C:\Users\XXXX\OneDrive - YYYY\Documents\Project\venv Python\lib\site-packages\great_expectations\cli\toolkit.py", line 146, in get_default_expectation_suite_name
    suite_name = f"batch-{BatchRequest(**batch_request).id}"  # type: ignore[arg-type] # cannot unpack str
TypeError: __init__() missing 1 required positional argument: 'data_asset_name'
```

Configuration string:
```
`example_yaml = f"""
name: {datasource_name}
class_name: Datasource
execution_engine:
  class_name: PandasExecutionEngine
data_connectors:
  default_inferred_data_connector_name:
    class_name: InferredAssetFilesystemDataConnector
    base_directory: ..\..\..\..\..\YYYY\KPI RH - General\\02-Données sources auto\\01-My Files\\1-Tickets
    default_regex:
      group_names:
        - data_asset_name
      pattern: (FR-Export HR Cases .*)
  default_runtime_data_connector_name:
    class_name: RuntimeDataConnector
    assets:
      my_runtime_asset_name:
        batch_identifiers:
          - runtime_batch_identifier_name
"""
print(example_yaml)
```


Discussion:
Hey @lenico! Thanks for raising this; we'll review this behavior.
It's definitely an issues with accents, to reproduce:

- set up a new data source, include an accent in the directory, for instance: `..\..\testé`
- try to run the assistant on this data source --> error

Note: using unicode in the yml file doesn't solve the issue: `..\..\test\u00e9` crashes the same way
Another test:
- removing the accent from the directory
- but adding an accent to the file name

==> the jupyter notebooks loads, but the accents display a strange character: 
- actual: `test�` 
- expected: `testé`

Note: in French we can have accents in directory and/or file names.


Thank you
Hey @lenico ! Thanks for this additional context. I'll raise this with the core team in the coming week. Is this something you'd be interested in contributing on?
How could I help?
I tried to check the code quickly but I couldn't figure out by myself how to solve it properly. 
Any idea how i could make it work with the current version (I cannot remove the accents from the path) ?

Thank you
This is the same bug as #5462 and related to the how a `RuntimeDataConnector` interacts with `BatchRequest`s in the CLI.  

@austiezr it'll be good to get this worked on as even using any `RuntimeDataConnector` examples from the [docs](https://docs.greatexpectations.io/docs/guides/connecting_to_your_data/datasource_configuration/how_to_configure_a_sql_datasource) with the CLI are broken

Resolving patch:
diff --git a/great_expectations/cli/toolkit.py b/great_expectations/cli/toolkit.py
--- a/great_expectations/cli/toolkit.py
+++ b/great_expectations/cli/toolkit.py
@@ -1113,5 +1113,8 @@ def get_batch_request_using_datasource_name(
         datasource=datasource,  # type: ignore[arg-type] # could be LegacyDatasource
         additional_batch_request_args=additional_batch_request_args,
     )
+    if "data_asset_name" not in batch_request:
+        # Some datasources don't always provide this (`RuntimeDataConnector`)
+        batch_request["data_asset_name"] = "default_data_asset_name"
 
     return batch_request


Test patch:
diff --git a/tests/cli/test_toolkit.py b/tests/cli/test_toolkit.py
--- a/tests/cli/test_toolkit.py
+++ b/tests/cli/test_toolkit.py
@@ -524,3 +524,13 @@ def test_get_relative_path_from_config_file_to_data_base_file_path_from_misc_dir
     )
     obs = get_relative_path_from_config_file_to_base_path(ge_dir, absolute_path)
     assert obs == os.path.join("..", "..", "data", "pipeline1")
+
+
+def test_get_batch_request_using_datasource_name_has_data_asset_name_(
+    in_memory_runtime_context, basic_datasource
+):
+    in_memory_runtime_context.datasources["my_datasource"] = basic_datasource
+    batch_request = toolkit.get_batch_request_using_datasource_name(
+        in_memory_runtime_context, "my_datasource"
+    )
+    assert batch_request["data_asset_name"] == "default_data_asset_name"