Repository: pymedusa/Medusa

Issue:
[APP SUBMITTED]: AttributeError: 'module' object has no attribute 'core'

### INFO
**Python Version**: `2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)]`
**Operating System**: `Windows-7-6.1.7601-SP1`
**Locale**: `cp1252`
**Branch**: [master](../tree/master)
**Database**: `44.9`
**Commit**: pymedusa/Medusa@77b20916ab577b82112ebc624f816054788c63f2
**Link to Log**: https://gist.github.com/7f6099e1c66cecd44e069bffee91a3ac
### ERROR
<pre>
2018-04-23 16:08:49 ERROR    Thread_18 :: [77b2091] Exception generated: 'module' object has no attribute 'core'
Traceback (most recent call last):
  File "C:\Medusa\Medusa\medusa\server\web\core\base.py", line 285, in async_call
    result = function(**kwargs)
  File "C:\Medusa\Medusa\medusa\server\web\home\handler.py", line 357, in testGrowl
    result = notifiers.growl_notifier.test_notify(host, password)
  File "C:\Medusa\Medusa\medusa\notifiers\growl.py", line 22, in test_notify
    self._sendRegistration(host, password)
  File "C:\Medusa\Medusa\medusa\notifiers\growl.py", line 174, in _sendRegistration
    register = gntp.core.GNTPRegister()
AttributeError: 'module' object has no attribute 'core'
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators



Discussion:
Sorry about that. Fixed for real this time with: https://github.com/pymedusa/Medusa/pull/4086
No need to apologize… Thank you.

 

From: Dario [mailto:notifications@github.com] 
Sent: Monday, April 23, 2018 5:22 PM
To: pymedusa/Medusa
Cc: DrakeJones; Author
Subject: Re: [pymedusa/Medusa] [APP SUBMITTED]: AttributeError: 'module' object has no attribute 'core' (#4084)

 

Sorry about that. Fix for real this time with: #4086 <https://github.com/pymedusa/Medusa/pull/4086> 

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <https://github.com/pymedusa/Medusa/issues/4084#issuecomment-383614255> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AF-CmPJ1sG4eBI4zFF0Q3eOUP8yOt0F-ks5trfF9gaJpZM4Tf-85> .  <https://github.com/notifications/beacon/AF-CmKIYsWeKLh7FpWAfUhTrmS1V10haks5trfF9gaJpZM4Tf-85.gif> 



---
This email has been checked for viruses by AVG.
http://www.avg.com


### INFO
**Python Version**: `2.7.9 (default, Sep 17 2016, 20:26:04) [GCC 4.9.2]`
**Operating System**: `Linux-4.9.35-v7+-armv7l-with-debian-8.0`
**Locale**: `UTF-8`
**Branch**: [develop](../tree/develop)
**Database**: `44.11`
**Commit**: pymedusa/Medusa@e308ef34cf3911a78fef2fc1de3b32a7a100eaa6
**Link to Log**: https://gist.github.com/b1f6088fe4f08c22ac7df425bfb59cc4
### ERROR
<pre>
2018-07-03 02:39:59 ERROR    Thread_5 :: [e308ef3] Exception generated: 'module' object has no attribute 'EXIST'
Traceback (most recent call last):
  File "/home/pi/Medusa/<a href="../blob/e308ef34cf3911a78fef2fc1de3b32a7a100eaa6/medusa/server/web/core/base.py#L283">medusa/server/web/core/base.py</a>", line 283, in async_call
    result = function(**kwargs)
  File "/home/pi/Medusa/<a href="../blob/e308ef34cf3911a78fef2fc1de3b32a7a100eaa6/medusa/server/web/home/post_process.py#L49">medusa/server/web/home/post_process.py</a>", line 49, in processEpisode
    ignore_subs=argToBool(ignore_subs)
  File "/home/pi/Medusa/<a href="../blob/e308ef34cf3911a78fef2fc1de3b32a7a100eaa6/medusa/process_tv.py#L145">medusa/process_tv.py</a>", line 145, in process
    ignore_subs=ignore_subs)
  File "/home/pi/Medusa/<a href="../blob/e308ef34cf3911a78fef2fc1de3b32a7a100eaa6/medusa/process_tv.py#L333">medusa/process_tv.py</a>", line 333, in process_files
    self.process_media(path, self.video_files, force, is_priority, ignore_subs)
  File "/home/pi/Medusa/<a href="../blob/e308ef34cf3911a78fef2fc1de3b32a7a100eaa6/medusa/process_tv.py#L554">medusa/process_tv.py</a>", line 554, in process_media
    self.result = processor.process()
  File "/home/pi/Medusa/<a href="../blob/e308ef34cf3911a78fef2fc1de3b32a7a100eaa6/medusa/post_processor.py#L1231">medusa/post_processor.py</a>", line 1231, in process
    app.MOVE_ASSOCIATED_FILES, app.USE_SUBTITLES and ep_obj.series.subtitles)
  File "/home/pi/Medusa/<a href="../blob/e308ef34cf3911a78fef2fc1de3b32a7a100eaa6/medusa/post_processor.py#L514">medusa/post_processor.py</a>", line 514, in post_process_action
    action=action, subtitle_action=subtitle_action, subtitles=subtitles)
  File "/home/pi/Medusa/<a href="../blob/e308ef34cf3911a78fef2fc1de3b32a7a100eaa6/medusa/post_processor.py#L457">medusa/post_processor.py</a>", line 457, in _combined_file_operation
    action(cur_associated_file, new_file_path)
  File "/home/pi/Medusa/<a href="../blob/e308ef34cf3911a78fef2fc1de3b32a7a100eaa6/medusa/post_processor.py#L492">medusa/post_processor.py</a>", line 492, in hardlink
    helpers.hardlink_file(cur_file_path, new_file_path)
  File "/home/pi/Medusa/<a href="../blob/e308ef34cf3911a78fef2fc1de3b32a7a100eaa6/medusa/helpers/__init__.py#L349">medusa/helpers/__init__.py</a>", line 349, in hardlink_file
    if msg.errno == errno.EXIST:
AttributeError: 'module' object has no attribute 'EXIST'
</pre>
---
_STAFF NOTIFIED_: @pymedusa/support @pymedusa/moderators


Resolving patch:
diff --git a/medusa/helpers/__init__.py b/medusa/helpers/__init__.py
--- a/medusa/helpers/__init__.py
+++ b/medusa/helpers/__init__.py
@@ -346,7 +346,7 @@ def hardlink_file(src_file, dest_file):
         link(src_file, dest_file)
         fix_set_group_id(dest_file)
     except OSError as msg:
-        if msg.errno == errno.EXIST:
+        if msg.errno == errno.EEXIST:
             # File exists. Don't fallback to copy
             log.warning(
                 u'Failed to create hardlink of {source} at {destination}.'
@@ -399,7 +399,7 @@ def move_and_symlink_file(src_file, dest_file):
         fix_set_group_id(dest_file)
         symlink(dest_file, src_file)
     except OSError as msg:
-        if msg.errno == errno.EXIST:
+        if msg.errno == errno.EEXIST:
             # File exists. Don't fallback to copy
             log.warning(
                 u'Failed to create symlink of {source} at {destination}.'


Test patch: