-
Notifications
You must be signed in to change notification settings - Fork 483
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
Unicode issue in file path (username)/filename - daemon fails to start or downloads fail to work #794
Comments
Folder name is Богдан |
This is occurring more frequently as we onboard additional users. Got a handful of complaints with the same issue via helpdesk and slack. |
First-timer here: |
I think this might be the fix : #822 |
I looked through some other logs, and another user had a slightly different error. |
Username: ćńóźżł |
Per @kaykurokawa: the problem i think is not sqlite related, most likely will need to fix up this file https://github.com/lbryio/lbry/blob/master/lbrynet/winhelpers/knownpaths.py |
While troubleshooting with another user, I ran into yet a different scenario where LBRY daemon cannot even start up to the point where I can alter the data/lbryum/downloads paths via settings - the lbry folder is never created. This happens on Windows 10. On Windows 7, I get the lbry folders created and then can redirect the data/downloads/wallet dirs. The user path is: C:\Users\Dellé\AppData This error: |
The current workaround (except for this particular case- #794 (comment)) is to manually set the working directories for LBRY in the default lbrynet directory (https://lbry.io/faq/lbry-directories). You can manually set these directories in the daemon_settings.yml file. If this file does not exist in your lbrynet folder, you can use this one: https://drive.google.com/open?id=0BzKw_BSaBa_5ZXJzSDkyZXhVelU This will setup your directories as follows or you can edit the file to change your own (but again, don't use any folders with non-English letters): |
This should be relatively simple to solve. Use Python 3 :D I jest. |
@kennethreitz humor is the good natured side of a truth |
I have the same problem with cyrillic usernames. I also had the same issue with Electrum, maybe this thread will help. |
i think this file needs a looking at maybe at a function to get language encoding user has and set encoding to that? |
i think this needs to change
|
Come across 2 users who also had this issue, but it prevented from downloading/streaming content because it affected their Downloads directory - somehow the app started fine though. The error:
|
To summarize, one of 3 things may happen if these characters exist in your windows username:
|
Here's what electrum did to solve this (or a similar) issue: spesmilo/electrum@6318bda |
Another example:
|
@tzarebczan please test after p3 integration |
@tzarebczan Can this issue be closed? |
Tested a bunch of the scenario above and I can happily say that this was indeed fixed by the python 3 upgrade! Woohoo! |
The Issue
If a user directory has unicode characters, the daemon fails to start. This particular user must have such characters in his Windows username, see logs below. The log file shows the username as ������, I'm checking with the user what his Username actually is, will update the issue later.
In some cases, the daemon works but the downloads folder does not. This results in trouble getting to the Settings tab (because it can't read the folder) and the directory needs to be manually set via daemon_settings.yml
To summarize, one of 3 things may happen if these characters exist in your windows username:
can't run daemon at all
can run daemon, but wallet fails to initialize and then crashes
can run daemon, but downloads fail to write to folder so it seems like you can't download
Steps to reproduce
Expected behaviour
Daemon starts up / fikes download
Actual behaviour
Daemon fails / files fail to save/access
System Configuration
Anything Else
2017-07-21 23:33:12,217 INFO lbrynet.daemon.Daemon:241: Starting lbrynet-daemon
2017-07-21 23:33:12,358 INFO lbrynet.daemon.ExchangeRateManager:174: Starting exchange rate manager
2017-07-21 23:33:13,480 INFO lbrynet.daemon.Daemon:268: Platform: {"lbrynet_version": "0.14.2rc5", "platform": "Windows-8.1-6.3.9600", "os_system": "Windows", "python_version": "2.7.13", "os_release": "8.1", "lbryum_version": "3.1.4rc2", "ip": "xxxxx", "lbryschema_version": "0.0.8", "processor": "Intel64 Family 6 Model 69 Stepping 1, GenuineIntel", "build": "rc"}
2017-07-21 23:33:13,490 INFO lbrynet.daemon.Daemon:473: Loading databases
2017-07-21 23:33:13,500 INFO lbrynet.daemon.Daemon:537: Using lbryum wallet
2017-07-21 23:33:14,959 INFO lbrynet.core.Session:213: Set UPnP redirect for TCP port 3333
2017-07-21 23:33:15,118 INFO lbrynet.core.Session:224: Set UPnP redirect for UDP port 4444
2017-07-21 23:33:15,121 INFO lbrynet.core.Session:254: Starting DHT
2017-07-21 23:33:15,141 INFO lbrynet.dht.protocol:216: DHT listening on UDP 4444
2017-07-21 23:33:15,147 INFO lbrynet.core.RateLimiter:72: Starting <lbrynet.core.RateLimiter.RateLimiter object at 0x03FC91F0>
2017-07-21 23:33:15,147 INFO lbrynet.core.BlobManager:97: Setting up the DiskBlobManager. blob_dir: C:\Users\������\AppData\Roaming\lbrynet\blobfiles, db_file: C:\Users\������\AppData\Roaming\lbrynet\blobs.db
2017-07-21 23:33:15,151 ERROR lbrynet.daemon.DaemonControl:112: Failed to startup
Traceback (most recent call last):
File "site-packages\lbrynet\daemon\DaemonControl.py", line 109, in start_server_and_listen
FirstError: FirstError[#1, [Failure instance: Traceback: <class 'sqlite3.OperationalError'>: unable to open database file
threading.py:801:__bootstrap_inner
threading.py:754:run
site-packages\twisted_threads_threadworker.py:46:work
site-packages\twisted_threads_team.py:190:doWork
--- ---
site-packages\twisted\python\threadpool.py:246:inContext
site-packages\twisted\python\threadpool.py:262:
site-packages\twisted\python\context.py:118:callWithContext
site-packages\twisted\python\context.py:81:callWithContext
site-packages\twisted\enterprise\adbapi.py:464:_runInteraction
site-packages\twisted\enterprise\adbapi.py:36:init
site-packages\twisted\enterprise\adbapi.py:76:reconnect
site-packages\twisted\enterprise\adbapi.py:431:connect
]]
2017-07-21 23:33:15,153 INFO lbrynet.daemon.Daemon:402: Closing lbrynet session
2017-07-21 23:33:15,154 INFO lbrynet.daemon.Daemon:403: Status at time of shutdown: loading_wallet
2017-07-21 23:33:15,157 INFO lbrynet.core.Session:172: Shutting down <lbrynet.core.Session.Session object at 0x03FDACB0>
2017-07-21 23:33:15,158 INFO lbrynet.core.BlobAvailability:35: Stopping <lbrynet.core.BlobAvailability.BlobAvailabilityTracker object at 0x03F99A90>
2017-07-21 23:33:15,160 INFO lbrynet.core.RateLimiter:83: Stopping <lbrynet.core.RateLimiter.RateLimiter object at 0x03FC91F0>
2017-07-21 23:33:15,160 INFO lbrynet.core.client.DHTPeerFinder:28: Stopping <lbrynet.core.client.DHTPeerFinder.DHTPeerFinder object at 0x040EB2F0>
2017-07-21 23:33:15,161 INFO lbrynet.core.server.DHTHashAnnouncer:31: Stopping <lbrynet.core.server.DHTHashAnnouncer.DHTHashAnnouncer object at 0x040EB3D0>
2017-07-21 23:33:15,161 INFO lbrynet.core.Wallet:475: Stopping <lbrynet.core.Wallet.LBRYumWallet object at 0x03FDAB30>
2017-07-21 23:33:15,161 ERROR lbrynet.core.Wallet:541: Something went wrong during manage. Error message: 'NoneType' object has no attribute 'get_balance'
2017-07-21 23:33:15,167 ERROR lbrynet.core.Wallet:472: An error occurred stopping the wallet: Traceback (most recent call last):
File "site-packages\twisted\internet\defer.py", line 308, in addCallbacks
File "site-packages\twisted\internet\defer.py", line 651, in _runCallbacks
File "site-packages\lbrynet\core\Wallet.py", line 528, in
File "site-packages\twisted\internet\defer.py", line 1445, in unwindGenerator
--- ---
File "site-packages\twisted\internet\defer.py", line 1299, in _inlineCallbacks
File "site-packages\lbrynet\core\Wallet.py", line 558, in update_balance
File "site-packages\lbrynet\core\Wallet.py", line 1288, in _update_balance
File "site-packages\lbrynet\core\Wallet.py", line 1273, in _run_cmd_as_defer_succeed
File "site-packages\lbryum\commands.py", line 140, in func_wrapper
File "site-packages\lbryum\commands.py", line 358, in getbalance
exceptions.AttributeError: 'NoneType' object has no attribute 'get_balance'
2017-07-21 23:33:15,171 INFO lbrynet.core.BlobManager:101: Stopping the DiskBlobManager
2017-07-21 23:33:15,174 INFO lbrynet.core.Session:322: Unsetting upnp for <lbrynet.core.Session.Session object at 0x03FDACB0>
2017-07-21 23:33:15,177 INFO lbrynet.dht.protocol:468: Stopping DHT
2017-07-21 23:33:15,177 INFO lbrynet.dht.protocol:484: DHT stopped
2017-07-21 23:33:16,457 WARNING lbrynet.core.Session:333: UPnP redirect for TCP 3333 was removed by something else.
2017-07-21 23:33:16,542 WARNING lbrynet.core.Session:333: UPnP redirect for UDP 4444 was removed by something else.
2017-07-21 23:33:16,546 INFO lbrynet.daemon.Daemon:402: Closing lbrynet session
2017-07-21 23:33:16,548 INFO lbrynet.daemon.Daemon:403: Status at time of shutdown: loading_wallet
2017-07-21 23:33:16,549 INFO lbrynet.core.Session:172: Shutting down <lbrynet.core.Session.Session object at 0x03FDACB0>
2017-07-21 23:33:16,552 INFO lbrynet.core.BlobAvailability:35: Stopping <lbrynet.core.BlobAvailability.BlobAvailabilityTracker object at 0x03F99A90>
2017-07-21 23:33:16,552 INFO lbrynet.core.RateLimiter:83: Stopping <lbrynet.core.RateLimiter.RateLimiter object at 0x03FC91F0>
2017-07-21 23:33:16,552 INFO lbrynet.core.client.DHTPeerFinder:28: Stopping <lbrynet.core.client.DHTPeerFinder.DHTPeerFinder object at 0x040EB2F0>
2017-07-21 23:33:16,552 INFO lbrynet.core.server.DHTHashAnnouncer:31: Stopping <lbrynet.core.server.DHTHashAnnouncer.DHTHashAnnouncer object at 0x040EB3D0>
2017-07-21 23:33:16,553 INFO lbrynet.core.Wallet:475: Stopping <lbrynet.core.Wallet.LBRYumWallet object at 0x03FDAB30>
2017-07-21 23:33:16,553 ERROR lbrynet.core.Wallet:541: Something went wrong during manage. Error message: 'NoneType' object has no attribute 'get_balance'
2017-07-21 23:33:16,559 ERROR lbrynet.core.Wallet:472: An error occurred stopping the wallet: Traceback (most recent call last):
File "site-packages\twisted\internet\defer.py", line 308, in addCallbacks
File "site-packages\twisted\internet\defer.py", line 651, in _runCallbacks
File "site-packages\lbrynet\core\Wallet.py", line 528, in
File "site-packages\twisted\internet\defer.py", line 1445, in unwindGenerator
--- ---
File "site-packages\twisted\internet\defer.py", line 1299, in _inlineCallbacks
File "site-packages\lbrynet\core\Wallet.py", line 558, in update_balance
File "site-packages\lbrynet\core\Wallet.py", line 1288, in _update_balance
File "site-packages\lbrynet\core\Wallet.py", line 1273, in _run_cmd_as_defer_succeed
File "site-packages\lbryum\commands.py", line 140, in func_wrapper
File "site-packages\lbryum\commands.py", line 358, in getbalance
exceptions.AttributeError: 'NoneType' object has no attribute 'get_balance'
2017-07-21 23:33:16,562 INFO lbrynet.core.BlobManager:101: Stopping the DiskBlobManager
2017-07-21 23:33:16,565 INFO lbrynet.core.Session:322: Unsetting upnp for <lbrynet.core.Session.Session object at 0x03FDACB0>
2017-07-21 23:33:17,780 CRITICAL twisted:154: Unhandled error in Deferred:
2017-07-21 23:33:17,780 CRITICAL twisted:154:
Traceback (most recent call last):
File "site-packages\twisted\internet\defer.py", line 150, in maybeDeferred
File "site-packages\lbrynet\core\BlobManager.py", line 102, in stop
File "site-packages\twisted\enterprise\adbapi.py", line 397, in close
File "site-packages\twisted\enterprise\adbapi.py", line 405, in finalClose
File "site-packages\twisted\python\threadpool.py", line 274, in stop
File "site-packages\twisted_threads_team.py", line 226, in quit
File "site-packages\twisted_threads_convenience.py", line 35, in set
File "site-packages\twisted_threads_convenience.py", line 46, in check
AlreadyQuit
Screenshots
The text was updated successfully, but these errors were encountered: