Closed luckiestone closed 4 years ago
Hi @luckiestone, I'm currently on vacation in Cuba (until December 9) and am unable to properly assist. I'll have to look at it closer once I get back, but my hope is that the tool does support Unicode. When you get this dialog window popping up, could you try clicking the Retry button and then posting the callstack/backtrace that will be displayed in one of Visual Studio's tool windows (usually at the bottom)?
@mikedld Thanks for your reply! Sorry for posting the issue during your vacation! Please enjoy your vacation first! I debugged it in VS2017 and the detailed error is shown in the picture, and I also copied the call stack here:
ucrtbased.dll!7abefd10() Unknown
[External Code]
BtMigrate.exe!boost::filesystem::basic_ifstream<char,std::char_traits<char> >::open(const boost::filesystem::path & p, int mode) Line 92 C++
BtMigrate.exe!MigrationTransaction::GetReadStream(const boost::filesystem::path & path) Line 105 C++
BtMigrate.exe!`anonymous namespace'::uTorrentTorrentStateIterator::GetNext(Box & nextBox) Line 188 C++
BtMigrate.exe!DebugTorrentStateIterator::GetNext(Box & nextBox) Line 97 C++
BtMigrate.exe!ImportHelper::ImportImpl(const boost::filesystem::path & targetDataDir, IForwardIterator<Box> & boxes, ImportHelper::Result & result) Line 84 C++
[External Code]
Thanks, and have a nice vacation!
Update with the environment: Boost: 1.68.0 CMake: 3.16.0 VS: 2017 OS: Win10 Pro 18363.476
@luckiestone, please try this build to see if it fixes things (seems to do the job on my side): https://trtc.mikedld.com/viewLog.html?buildId=76375&buildTypeId=BtMigrate_WindowsX64&tab=artifacts#%2Fbinaries.zip
@mikedld Thank you for the build, but it still not working. It runs without error, but only a part was extracted, and it's 67 out of 434 torrents. The output resume and torrent files are still with additional extensions, it seems that the tool did not finish the whole process, which is similar to my build, but just without errors shown. I've looked into some files and someone says boost has an abnormal support of unicode. I have no clue of it, it's beyond my knowledge.
Does it finish successfully, with no "Error: ..." lines in console at the very end and no questions asked? Are you running a clean import, i.e. are those files being created anew or were they maybe created during some earlier import attempts?
@mikedld Yes it ran without questions nor any error in each line. In console it shows those torrents with Chinese or Japanese characters are exported successfully, but the Unicode characters shown in console become some random characters which were not they supposed to be. I ran it with a clean export, and have deleted everything in the export folder.
One more thing, when the tool runs do you see 434 torrents being printed in the console as being processed or only 67? In the latter case, would you mind sending me (mikedld@\<ditto>.com) the "resume.dat" file residing in your --source-dir
directory?
Sent with cmd log.
Here's another build for you to try: https://trtc.mikedld.com/viewLog.html?buildId=76377&buildTypeId=BtMigrate_WindowsX64&tab=artifacts#%2Fbinaries.zip
It should now hopefully pass with your data, but will issue a few warnings concerning invalid (non-UTF-8) paths. Save the log somewhere and see if those torrents are fine or need to be removed and migrated manually.
@mikedld Sorry for the late reply. I don't what tricks you have done, but this build works flawlessly! But there's another issue here. In the resume files the the destination is
==================EDIT==================
I found that the resume and torrent file names should be <torrent file name>.<hash?>.resume/.torrent
but the output files are all only <hash?>.resume/.torrent
, <torrent file name>
was missing.
And also in the export folder, there were some temp files but all 434 resume and torrent files are exported successfully, just with wrong name. The build runs with no error:
[2019-Dec-11 21:56:05.522496] [I] Finished: 434 succeeded, 0 failed, 0 skipped
[2019-Dec-11 21:56:05.523490] [I] Committing changes
I think chances are that there were some unicode named .torrent
files and they caused the whole process failure and missing of the <torrent file name>
part in the exported files.
If you're using Transmission 2.9x or older, please read https://github.com/mikedld/bt-migrate/issues/6#issuecomment-500030280. Basically, you'd want to set BT_MIGRATE_TRANSMISSION_2_9X
environment variable to any value when running BtMigrate so that torrent and resume files are named the old way.
If you're using Transmission 2.9x or older, please read #6 (comment). Basically, you'd want to set
BT_MIGRATE_TRANSMISSION_2_9X
environment variable to any value when running BtMigrate so that torrent and resume files are named the old way.
Thanks for the info, and sorry for the silly question, but how can I set BT_MIGRATE_TRANSMISSION_2_9X
to any value say 1 while running BtMigrate using cmd?
Is this correct?
>BtMigrate.exe BT_MIGRATE_TRANSMISSION_2_9X=1 --source utorrent --source-dir C:\Users\willw\Desktop\uTorrent --target transmission --target-dir C:\Users\willw\Desktop\transmission
On Windows with cmd, you'd use set
command to modify the environment, e.g.
> set BT_MIGRATE_TRANSMISSION_2_9X=1
> BtMigrate.exe ...
Thanks problem solved!
Hi mikedld, thank you for making this amazing tool.
I've spent two whole days to deal with the environment building, and finally cmake found boost libraries.
My platform is Windows 10, and I run the compiled exe file in debug folder(I guess it's correct)
In cmd i run
D:\bt-migrate\_build\Debug>BtMigrate.exe --source utorrent --source-dir D:\uTorrent --target transmission --target-dir D:\transmission
However, there were errors during I run the program, and only part of torrents are extracted. And the exported
.resume
and.torrent
file hava extensions likexxxxxx.tmp.20191202T203504.416060
. I guess it might have something to do with early abort. The error is shown in picture.It seems that something like UTF-8 or else is not supported, I've got many torrents containing Japanese and Chinese characters, none of them is extracted. I guess this might be the reason the programe is aborted.
Do you have any idea how to fix this problem?
Great great thanks for the tool, I've got thousands of torrents need to be migrated to transmission.