Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import: not possible to import mContats files #3494

Closed
Mitch037 opened this issue Apr 19, 2023 · 19 comments
Closed

Import: not possible to import mContats files #3494

Mitch037 opened this issue Apr 19, 2023 · 19 comments

Comments

@Mitch037
Copy link

Mitch037 commented Apr 19, 2023

  1. export contact's history (TXT or mContacts)
  2. clear contact's history (and delete it in case of importing mContacts)
  3. import contact's history back
    3.1. right-click on a contact, select Import and then select History++ from the list (for TXT) or Miranda NG database (for mContacts)
  4. Log:

when importing TXT

Number of contacts in database: 1
Skipping new contacts import.
Skipping system history import.
Importing history.
Loading file 'ContactHistory.txt'...
Import completed in 0 seconds.
Added 0 contacts and 0 groups.

when importing mContacts

Number of contacts in database: 1
Importing groups.
Importing contacts.
Skipping contact with no protocol
Importing system history.
Importing history.
Import completed in 0 seconds.
Added 0 contacts and 0 groups.
Skipped 1 contacts.

@Mitch037 Mitch037 added the bug label Apr 19, 2023
@georgehazan
Copy link
Member

@Mitch037 for which protocol, Steam?
cause the text file import works ok for Jabber

@Mitch037
Copy link
Author

@Mitch037 for which protocol, Steam? cause the text file import works ok for Jabber

Steam and Facebook for me. Did not test with other protocols.

@dartraiden
Copy link
Member

dartraiden commented Apr 20, 2023

Cannot reproduce TXT with Jabber and Facebook. Works fo me.

mContacts import is broken regardless of protocol.

@dartraiden dartraiden changed the title Import: not possible to import History++ files Import: not possible to import mContats files Apr 20, 2023
@Mitch037
Copy link
Author

Mitch037 commented Apr 21, 2023

@dartraiden

Cannot reproduce TXT with Jabber and Facebook. Works fo me.

Negative, it doesn't work for me.
I just did an additional test, this time with ICQ protocol. I prepared a fresh new Miranda directory, created a new profile, set my ICQ account, disabled any other protocols besides ICQ, Import and History++, and tried export-import via History++. It still doesn't work. I can export-import history of contacts using NewStory and MsgExport with no issues, but History++ just doesn't work. Make sure you follow the steps I put in the original post.

  1. Export history of a contact to TXT using History++
    1.1. right-click on the contact and select 'View history'
    1.2. select 'History actions'
    1.3. select 'Export as text...'
  2. Empty history of the contact
    2.1. right-click on the contact and select 'Empty history'
  3. Import history of the contact
    3.1. In "Choose file type:" select History++
    3.2. Select the TXT history file and click OK

For me the log looks like this:
Number of contacts in database: 1
Skipping new contacts import.
Skipping system history import.
Importing history.
Loading file 'ContactHistory.txt'...
Import completed in 0 seconds.
Added 0 contacts and 0 groups.

If it still does work for you, and doesn't work for me, then the only reason for it I can think of is the fact that I still use Windows 7 x64. Or there is something other weird going on as I've just discovered another function of History++ that doesn't work for me.
I use Miranda 'development version with debug symbols' (x64).

@georgehazan
Copy link
Member

@Mitch037 well, it's not a broken import, it's a broken export :-) you need to export files to mContacts format again

@Mitch037
Copy link
Author

Mitch037 commented Apr 21, 2023

@georgehazan well, it's not a broken import, it's a broken export :-) you need to export files to mContacts format again

I've just tested it and importing mContacts (extracted by History++) works for me now. However, importing TXT (extracted by History++) still doesn't work for me, regardless of protocol. Any idea how can I isolate the issue, log what exactly happens while importing to find out why it doesn't work for me?

@dartraiden
Copy link
Member

dartraiden commented Apr 21, 2023

Any idea how can I isolate the issue

Please provide an example of txt file. Perhaps the problem is similar - an incorrectly exported file.

Also provide version info report. Maybe the bug depends on the architecture (I tested only x64 build) or something else.

@dartraiden
Copy link
Member

dartraiden commented Apr 21, 2023

Tested: 32 and 64-bit build generate identical files. Import works on both 32 and 64-bit under Windows 10.

Added 0 contacts, 0 groups and 3 events.

@Mitch037
Copy link
Author

Mitch037 commented Apr 22, 2023

@dartraiden

###
### Full History Log
### Me (ICQ_1: 123456789) - Friend (ICQ_1: 123456)
### (generated by history++ plugin)
###

[2023-04-21 12:01:27] Me:
Hello

[2023-04-21 12:01:41] Me:
How are you?

[2023-04-21 12:02:08] Friend:
Hi!

[2023-04-21 12:02:18] Friend:
I'm fine, thanks!

@Mitch037
Copy link
Author

Mitch037 commented Apr 22, 2023

@dartraiden

CPU: Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz [Intel64 Family 6 Model 42 Stepping 7] [DEP Enabled] [8 CPUs]
Installed RAM: 8142 MBytes
Microsoft Windows 7 Professional Edition, 64-bit Service Pack 1 (build 7601)
Internet Explorer: 9.11.9600.20873 (build 99600)
Administrator privileges: Yes
OS Languages: (UI | Locale (User/System)) : English/English | English/English
Free disk space on Miranda partition: 36439 MBytes

Miranda NG Version: 0.96.3 alpha build #25545 (8594b8b1e2) x64
Build time: 21 Apr 2023 14:43:20
Profile: C:\miranda-ng\Profiles\TestX\TestX.dat
Database driver: SQLite database driver
Profile size: 139264 Bytes
Profile creation date: 22 Apr 2023 2:28:23
Language pack: No language pack installed
Service Mode: No
SRMM Log Viewer: built-in

Active Plugins (6):
¤ CrashDumper.dll v.[b]0.2.0.1[/b] [20 Apr 2023 18:49:54] - Crash dumper 
¤ DbChecker.dll v.[b]0.95.13.3[/b] [21 Apr 2023 14:46:38] - Database checker 
¤ Dbx_sqlite.dll v.[b]0.96.2.4[/b] [21 Apr 2023 14:46:30] - Miranda NG SQLite database driver 
¤ historypp.dll v.[b]1.5.1.5[/b] [21 Apr 2023 14:50:28] - History++ 
¤ ICQ.dll v.[b]0.96.3.2[/b] [20 Apr 2023 18:51:47] - ICQ-WIM protocol 
¤ Import.dll v.[b]0.95.11.1[/b] [21 Apr 2023 14:43:38] - Import contacts and messages 

Protocols and Accounts:
-------------------------------------------------------------------------------
ICQ                      1 - Enabled 0 - Disabled  Loaded

Icon Packs:
-------------------------------------------------------------------------------
 HistoryPP_icons.dll [21 Apr 2023 14:50:14]
 Proto_Dummy.dll [21 Apr 2023 14:50:16]
 Proto_Facebook.dll [20 Apr 2023 18:56:27]
 Proto_GG.dll [20 Apr 2023 19:56:26]
 Proto_ICQ.dll [20 Apr 2023 18:56:27]
 Proto_IRC.dll [20 Apr 2023 18:56:24]
 Proto_Jabber.dll [20 Apr 2023 18:56:24]
 Proto_MetaContacts.dll [21 Apr 2023 14:50:16]
 Proto_MRA.dll [20 Apr 2023 18:56:27]
 Proto_Skype.dll [20 Apr 2023 19:56:28]
 Proto_Steam.dll [20 Apr 2023 19:56:28]
 Proto_Tox.dll [20 Apr 2023 19:56:28]
 Proto_VKontakte.dll [20 Apr 2023 19:56:28]
 TabSRMM_icons.dll [20 Apr 2023 18:56:25]
 Toolbar_icons.dll [20 Apr 2023 18:56:24]
 xStatus_Jabber.dll [20 Apr 2023 18:56:25]

@dartraiden
Copy link
Member

dartraiden commented Apr 27, 2023

Your history:
[2023-04-21 12:01:27]

My history
[21.04.2023 12:01:27]

@dartraiden dartraiden reopened this Apr 27, 2023
@dartraiden
Copy link
Member

History++ written on Pascal. Pascal uses Windows date format.

Moreover, it uses the format from the LANGUAGE settings.

@Mitch037
Copy link
Author

History++ written on Pascal. Pascal uses Windows date format.

Moreover, it uses the format from the LANGUAGE settings.

Ah, it makes more sense now. My region is set to Polish (Poland) so it is YYYY-MM-DD (Year-Month-Day). Is the day format the reason why it's not imported?

@dartraiden
Copy link
Member

dartraiden commented Apr 27, 2023

The problem is that the History++, when exporting, uses the date format from the Windows settings, but Import uses default format for current region

Example: Russian default date format is dd.mm.yyyy. If I change the format here

photo_2023-04-27_17-38-57

to custom yyyy-mm-dd, then in the exported history i will get yyyy-mm-dd (Pascal respects Windows setting), but Import expects dd.mm.yyyy and fails.

@Mitch037
Copy link
Author

Mitch037 commented Apr 27, 2023

By default it's yyyy-MM-dd for Polish (Poland) in Windows 7. It is not my custom-made format.
Would it be possible to make an appropriate change in History++ to take different date formats into account while exporting?

@dartraiden
Copy link
Member

dartraiden commented Apr 27, 2023

Then the bug is more simply: "Import does not like the yyyy-MM-dd format" regardless of region and language

@Mitch037
Copy link
Author

Then the bug is more simply: "Import does not like the yyyy-MM-dd format" regardless of region and language

You're right. I would have never realized it is the reason of the issue. Thank you! :-) Shall I open a new ticket for it or simply re-name the existing one?

@dartraiden
Copy link
Member

#3514

@dartraiden
Copy link
Member

dartraiden commented May 15, 2023

Starting from build 25606 History++ forces the format dd.mm.yyyy in exported files. This is easier than trying to adapt the regular expression to all the regional formats in the world. This will not fix the import of already existing files, but it will prevent the problem for newly created ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants