MapInfo Pro

Welcome to the MapInfo Pro community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Here are some useful links where you can find more information:

Product Announcements  Product Documentation  Ideas Portal

Discussions

Members

Resources

Events

 View Only

MapInfo error on opening workspace

Brynley Hull

Brynley Hull10-04-2017 23:02

  • 1.  MapInfo error on opening workspace

    Posted 10-04-2017 06:18

    Hi, I'm trying to create a simple thematic map using MapInfo 15.0. When I open the data file (an Excel file) I have to change the data type of the "postcode" variable to Character (4) to match the postcode data type in the geography file which is Character (4) (checked through Table structure). I then geocode the data file to the geography file by postcode and all works fine. I then create a thematic map and all works fine. However, if I save the workspace and quit MapInfo, when I try to re-open the workspace in MapInfo to make some changes to my map the workspace won't open and gives me the message “Found [where] while searching for a [(]”

    I've done some testing and the workspace only doesn't re-open if I have changed the "postcode" variable data type to Character (4). However, if I don't change the "postcode" data type and leave it as "Float" then there is a data type mis-match for postcode and I cannot create a thematic map. Any ideas in resolving this? Thanks.



  • 2.  RE: MapInfo error on opening workspace

    Employee
    Posted 10-04-2017 02:45

    Hi Brynley

    Is it possible to share data sample and workspace?

    Thanks. Neena



  • 3.  RE: MapInfo error on opening workspace

    Posted 10-04-2017 03:03

    @Brynley Hull?, as @Dr Neena Priyanka? said, could you upload the WOR file? Even better if you can upload some of the data as well.

    My initial thought would be that a small tweak can be made to the WOR file to make it work.



  • 4.  RE: MapInfo error on opening workspace

    Employee
    Posted 10-04-2017 07:15

    Hi Brynley,

    Re: the MapInfo Pro Workspace that gives the error message,

    were those queries being used for the thematic map when doing the join?

    Are you performing a thematic map with a joined query table, example (query1)?

    In the workspace created, are you geocoding the table or joining on postal codes against a mappable table and saving that as a table or query?

    If it is a query, it sounds that the thematic is being created from the query and when you the save the workspace and close out to re-open the thematic is gone.

    If you were to save that query as a native table > Home > Save Copy as > Rename table (geocoded_Table)

    Re-open Geocoded_Table and Create the thematic map and save workspace.

     

    Let us know if you can send us the packaged workspace or .wor file. and screenshot of the error message if the problems persists.

     



  • 5.  RE: MapInfo error on opening workspace

    Employee
    Posted 10-04-2017 09:26

    Brynley, I agree with the other people posting - a packaged workspace (use MapInfo Pro's "workspace packager" tool to package the workspace to an empty folder and then zip the contents) or at least the .wor file would be very helpful, in addition to a screenshot of the error message.

    Workspace errors typically have a line number displayed and this line number is usually the last line of the .wor to execute so it can help us to track down the source of the error.

    Thanks!

    Dave



  • 6.  RE: MapInfo error on opening workspace

    Posted 10-04-2017 22:46
      |   view attached

    ?Hi all, thanks for your replies. As Dave S suggested I used the workspace packager tool which created a bunch of MapInfo files. I've zipped these using WinZip and have attached them. I'll also attach a screen shot of the error message as a Word file, Cheers Brynley

    Attachment(s)

    zip
    NSWISS_data.zip   31.47 MB 1 version


  • 7.  RE: MapInfo error on opening workspace

    Posted 10-04-2017 23:02
      |   view attached

    Screenshot attached of error message.?

    Attachment(s)



  • 8.  RE: MapInfo error on opening workspace

    Employee
    Posted 10-05-2017 01:54

    Hi Brynley

    Thanks for sharing data and workspace. The problem lies in line 6 of your workspace where you are trying to add column "Add Column "POA_2011_AUST" (_COL2) From NSWISS_1800_Database_2015_17_f Set To count Where COL1 = COL1 Dynamic" . This query is not executed correctly even if you run this independently in mapbasic window. I am working on this and will share resolution asap.

    Thanks. Neena



  • 9.  RE: MapInfo error on opening workspace

    Employee
    Posted 10-05-2017 02:07

    Hi Brynley

    Please find attached updated workspace for your reference. The file is opening correctly now with your defined thematics.

    Line 6 had error with respect count as column name instead it should be _COL2.

    Correction done: changed count with _COL2

    Line 6: Add Column "POA_2011_AUST" (_COL2 )From NSWISS_1800_Database_2015_17_f Set To _COL2 Where COL1 = COL1

    Hope this helps!

    Thanks. Neena



  • 10.  RE: MapInfo error on opening workspace

    Posted 10-05-2017 02:24

    Great! Thanks Neena. Appreciated. Am I correct in saying that I shouldn't have used "count" as the variable name in the file "NSWISS_1800_Database_2015_17" as in many computer programs? such as Excel, SAS, MapInfo etc "count" is a mathematical function?



  • 11.  RE: MapInfo error on opening workspace

    Employee
    Posted 10-05-2017 02:32

    You can use any variable name as you may like but that variable should be defined as base column name in the table while executing Add Column query.



  • 12.  RE: MapInfo error on opening workspace

    Employee
    Posted 10-05-2017 02:43

    Hi Brynley,

    This error usually comes when MapInfo Pro is not able to open 1 of the associated tab files of the wor or else you try to open the Wor file into Pro by double clicking on it.

     

    With the given data here, open the 2 tab files and save them again as a wor. It should work.

    Regards,

    Shweta



  • 13.  RE: MapInfo error on opening workspace

    Employee
    Posted 10-05-2017 08:16

     

    Nice work around @Neena!

    We are curious how this workspace ended up in a broken state? How did "count" end up in the .wor reference? Perhaps a SQL Query Select statement was created and then saved as a query to and hard coded in the workspace? We would like to try and document the steps for an article.



  • 14.  RE: MapInfo error on opening workspace

    Employee
    Posted 10-05-2017 10:51

    While using SQL query dialog box, when you try to run group by statement on any selected column, it creates Count column by default

    For example

    Select Columns: POA_CODE_2011, Count(*);

    Group by: POA_CODE_2011

    When you try to use this column Count in any further query, this is referenced as COL2 by default in MapInfo. User have referenced this Count column in his workspace instead of COL2. This is what I could infer from the workspace.

    I hope it clarifies.

    Cheers. Neena



  • 15.  RE: MapInfo error on opening workspace

    Posted 10-05-2017 20:39

    Hi all, for your info I didn't create any SQL Query Select statements in creating the map.? I merely opened the "NSWISS_1800_Database_2015_17" Excel file in MapInfo and set the field properties for the 2 variables in the file (postcode and count).

    What did work for me late yesterday was renaming the "count" variable as "phone_calls" (the map was mapping hospital related phone calls) in Excel and then opening the Excel file in MapInfo. I geocoded and created a thematic map, saved the workspace, exited from MapInfo. I then started MapInfo and opened the new workspace and no problems at all. No error message.