SQL Server error when creating dataset

I have connected to local SQL db and am trying to create my first dataset. I select create dataset, fill in all the details like name, db, basic statement select * from… and all I get is a quick pop up at the top of the screen saying there was an error trying to create the dataset. No more info. Is there a way to find out more about what the error was?

tia

1 Like

Hello @OBK. There is one dependency(mssql) that you need to install and now with the latest version can be done through Studio as:


Also, please check the prerequisite for using MindsDB with Microsoft SQL Server Microsoft SQL Server - MindsDB Documentation ?

HI Zoran, thx for the reply. I had not installed the dependency for mssql as you suggested and so did. I appear to have the prerequisites but still no luck. Connection tests seem to work fine as well as adding the database. But I still just get a brief popup saying “There was an error when trying to create the dataset”.

Any other ideas?

BTW I ran it with SQL profiler on and when I test the connection I see it connect fine. When I press create dataset it does not even try to connect to the database it just pops up the error.

1 Like

I have the exact same problem too!! Any ideas?

Hi! thanks for reporting this, can you share what operating system you are running MindsDB server on?

@OBK

Just in case you didn’t, try restarting mindsdb after you install the mssql dependency.
Also, can you provide the error logs from mindsdb Studio both when pressing install and when trying to create the datasource? (press in the bottom left)

@TRUCUTU can you try the same thing (+ the instructions Zoran gave regrading installing mssql related dependencies)

I will be trying to replicate and update if I have anything else to add.

Hi George, when you say restart mindsdb do you mean close the browser and reopen or is there a service I need to stop and start? Also not getting how I get the error log. Press the bottom left of what? The gui where the little red bug is? Which just seems to take me to a bug reporting screen (no log).

tia

64 bit windows 10 pro

HI George, Not sure how I shut down the service but I double clicked the descktop icon for minds db. Was I supposed to have done this before? This returns “…Microsoft SQL Server Datasource is not available by default. If you wish to use it, please install mindsdb_native[extra_data_sources…” in the dos window along with the following:

C:\Users\Admin\Desktop>C:\PROGRA~1\MindsDB\python\python.exe -m mindsdb --api=http,mysql

✓ telemetry enabled

MindsDB storage directory: C:\PROGRA~1\MindsDB\python\lib\site-packages\mindsdb_native\mindsdb_storage\2_34_0 does not exist and could not be created, trying another directory
S3 Datasource is not available by default. If you wish to use it, please install mindsdb_native[extra_data_sources]
Microsoft SQL Server Datasource is not available by default. If you wish to use it, please install mindsdb_native[extra_data_sources]
Athena Datasource is not available by default. If you wish to use it, please install mindsdb_native[extra_data_sources]
Google Cloud Storage Datasource is not available by default. If you wish to use it, please install mindsdb_native[extra_data_sources]
Versions:

  • lightwood 0.61.1
  • MindsDB_native 2.34.0
  • MindsDB 2.22.0
    Configuration file:
    absent
    Storage path:
    C:\Users\Admin\AppData\Roaming\mindsdb
    http API: starting…
    mysql API: starting…

✓ telemetry enabled

✓ telemetry enabled

MindsDB storage directory: C:\PROGRA~1\MindsDB\python\lib\site-packages\mindsdb_native\mindsdb_storage\2_34_0 does not exist and could not be created, trying another directory
MindsDB storage directory: C:\PROGRA~1\MindsDB\python\lib\site-packages\mindsdb_native\mindsdb_storage\2_34_0 does not exist and could not be created, trying another directory
S3 Datasource is not available by default. If you wish to use it, please install mindsdb_native[extra_data_sources]
Microsoft SQL Server Datasource is not available by default. If you wish to use it, please install mindsdb_native[extra_data_sources]
S3 Datasource is not available by default. If you wish to use it, please install mindsdb_native[extra_data_sources]
Microsoft SQL Server Datasource is not available by default. If you wish to use it, please install mindsdb_native[extra_data_sources]
Athena Datasource is not available by default. If you wish to use it, please install mindsdb_native[extra_data_sources]
Google Cloud Storage Datasource is not available by default. If you wish to use it, please install mindsdb_native[extra_data_sources]
Athena Datasource is not available by default. If you wish to use it, please install mindsdb_native[extra_data_sources]
Google Cloud Storage Datasource is not available by default. If you wish to use it, please install mindsdb_native[extra_data_sources]
mysql API: started on 47335
http API: started on 47334

Hi George, i have this message trying to instala mssql dependency:
imagen

Can you please share the console information, from MindsDB. There should be a more descriptive error

Trying to create a data set does not seem to generate anything in the console window. However simply moving to the database integrations screen creates the same error in the console window about 30+ times…,

2021-03-03 11:55:04 mindsdb logger~$ ERROR: the JSON object must be str, bytes or bytearray, not NoneType

2021-03-03 11:55:04 mindsdb logger~$ traceback: [’ File “C:\PROGRA~1\MindsDB\python\lib\site-packages\waitress\channel.py”, line 350, in service\n task.service()\n’, ’ File “C:\PROGRA~1\MindsDB\python\lib\site-packages\waitress\task.py”, line 171, in service\n self.execute()\n’, ’ File “C:\PROGRA~1\MindsDB\python\lib\site-packages\waitress\task.py”, line 441, in execute\n app_iter = self.channel.server.application(environ, start_response)\n’, ’ File “C:\PROGRA~1\MindsDB\python\lib\site-packages\flask\app.py”, line 2464, in call\n return self.wsgi_app(environ, start_response)\n’, ’ File “C:\PROGRA~1\MindsDB\python\lib\site-packages\flask\app.py”, line 2447, in wsgi_app\n response = self.full_dispatch_request()\n’, ’ File “C:\PROGRA~1\MindsDB\python\lib\site-packages\flask\app.py”, line 1950, in full_dispatch_request\n rv = self.dispatch_request()\n’, ’ File “C:\PROGRA~1\MindsDB\python\lib\site-packages\flask\app.py”, line 1936, in dispatch_request\n return self.view_functionsrule.endpoint\n’, ’ File “C:\PROGRA~1\MindsDB\python\lib\site-packages\flask_restx\api.py”, line 375, in wrapper\n resp = resource(*args, **kwargs)\n’, ’ File “C:\PROGRA~1\MindsDB\python\lib\site-packages\flask\views.py”, line 89, in view\n return self.dispatch_request(*args, **kwargs)\n’, ’ File “C:\PROGRA~1\MindsDB\python\lib\site-packages\flask_restx\resource.py”, line 44, in dispatch_request\n resp = meth(*args, **kwargs)\n’, ’ File “C:\PROGRA~1\MindsDB\python\lib\site-packages\flask_restx\marshalling.py”, line 248, in wrapper\n resp = f(*args, **kwargs)\n’, ’ File “C:\PROGRA~1\MindsDB\python\lib\site-packages\mindsdb\api\http\namespaces\datasource.py”, line 61, in get\n return ca.default_store.get_datasources()\n’, ’ File “C:\PROGRA~1\MindsDB\python\lib\site-packages\mindsdb\interfaces\datastore\datastore.py”, line 50, in get_datasources\n log.error(e)\n’, ’ File “D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\init.py”, line 1407, in error\n’, ’ File “D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\init.py”, line 1514, in _log\n’, ’ File “D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\init.py”, line 1524, in handle\n’, ’ File “C:\PROGRA~1\MindsDB\python\lib\site-packages\sentry_sdk\integrations\logging.py”, line 85, in sentry_patched_callhandlers\n return old_callhandlers(self, record)\n’, ’ File “D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\init.py”, line 1586, in callHandlers\n’, ’ File “D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\init.py”, line 894, in handle\n’, ’ File “C:\PROGRA~1\MindsDB\python\lib\site-packages\mindsdb\utilities\log.py”, line 65, in emit\n trace = str(traceback.format_stack(limit=20))\n’]

1 Like

1 Like

This looks like an issue with MindsDB. MindsDB is not able to parse some of the data you have, looks like NoneType. Is it possible for you to share a small example of your data(if that is doable), so we can try and reproduce the error? If not, maybe we can schedule a call to try and help you with the issues?

I can it is only made up test data but I do not see it even attempt to read any data from the database. As I said when I test the connection I can see it connect with SQL profiler but when I try and create the dataset it does not even attempt to connect to the database.

vh_study_id created_on updated_on deleted_on deleted_by uid date_time accession_number study_id description modalities_in_study modality number_of_instances patient_id patient_issuer patient_other_ids patient_birthdate patient_sex patient_firstname patient_middlename patient_lastname patient_prefix patient_suffix vh_node_id response_on validated_on_node_pair
1 2/2/21 5:24 PM 2/2/21 5:24 PM NULL NULL 1.1.2.2.2021.665598706970.971355707713960127 2/2/21 2:31 PM A1-7 NULL CT ABDOMEN/PELVIS STORAGE OF OUTSIDE FILMS CT CT 437 P1-6 NULL NULL 12/9/47 M John1-6 H Dennis NULL NULL 1 2/2/21 5:24 PM 2/2/21 5:27 PM
2 2/2/21 5:24 PM 2/2/21 5:24 PM NULL NULL 1.1.2.2.2021.665598706953.1942401038428449354 2/2/21 2:31 PM A1-5 NULL MRI BREAST BIOPSY SINGLE LESION LEFT CT CT 776 P1-5 NULL NULL 10/31/55 F Jane1-5 H Kinyon NULL NULL 1 2/2/21 5:24 PM 2/2/21 5:27 PM
3 2/2/21 5:24 PM 2/2/21 5:24 PM NULL NULL 1.1.2.2.2021.665598709003.8858141870536997455 2/2/21 2:31 PM A1-457 NULL BI US Guided Lymph Node Biopsy Right CT CT 1149 P1-411 NULL NULL 1/9/72 M John1-411 DeRego NULL NULL 1 2/2/21 5:24 PM 2/2/21 5:27 PM
4 2/2/21 5:24 PM 2/2/21 5:24 PM NULL NULL 1.1.2.2.2021.665598709693.7878763337598840511 2/2/21 2:31 PM A1-605 NULL US Guided Lymph Node Biopsy Left CT/MG MG 377 P1-542 NULL NULL 2/26/75 F Jane1-542 Q Shobert NULL NULL 1 2/2/21 5:24 PM 2/2/21 5:27 PM
5 2/2/21 5:24 PM 2/2/21 5:24 PM NULL NULL 1.1.2.2.2021.665598711213.8837104481916074315 2/2/21 2:31 PM A1-914 NULL X-ray Bilateral Ribs/Chest CT/US CT 695 P1-815 NULL NULL 6/4/90 M John1-815 Ethell NULL NULL 1 2/2/21 5:24 PM 2/2/21 5:27 PM
1 Like

I have imported your data in SQL Server and all works for me.

. Now, we can be sure that you are missing some of the prerequisites.

Please, check that you have the:

Thank you for all of the info and trying to help us to reproduce this.

@OBK, @TRUCUTU I think we were able to track down this issue. The fix from @George3d6 is already on staging so I will ping you again when we deploy it to the stable version. Also, we have improved the logging for DataSource creation to avoid this kind of issues. Thank you again for all of the information you provided that helped us a lot.

Good day. Have there been any updates to this issue? I found this thread after getting the same error messages on my first install today. I have verified that I have the MySQL drivers, and I can successfully test my connection to MSSQL server, but still getting the errors when I try to create a dataset or install the MSSQL dependencies. I believe I have the same issues as described here, just wondering if the fix was rolled out yet? Many thanks in advance, really looking forward to using MindsDB!