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

[Errno 38] Function not implemented: '/code' #91

Open
DanSafdie opened this issue Mar 25, 2021 · 1 comment
Open

[Errno 38] Function not implemented: '/code' #91

DanSafdie opened this issue Mar 25, 2021 · 1 comment

Comments

@DanSafdie
Copy link

Hello,

I'm getting the following error when I follow the docker-compose guide.

File "docker_quickstart.py", line 1, in <module>
from instapy import InstaPy
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 963, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 906, in _find_spec
File "<frozen importlib._bootstrap_external>", line 1280, in find_spec
File "<frozen importlib._bootstrap_external>", line 1252, in _get_spec
File "<frozen importlib._bootstrap_external>", line 1368, in find_spec
File "<frozen importlib._bootstrap_external>", line 1408, in _fill_cache
OSError: [Errno 38] Function not implemented: '/code'

for reference, her is my docker_quickstart.py file:

from instapy import InstaPy
from instapy.util import smart_run

# Write your automation here
# Stuck? Look at the github page https://github.com/InstaPy/instapy-quickstart

insta_username = "<redacted>"
insta_password = "<redacted>"

dont_like = ["food", "girl", "hot"] #placeholder. will not use this variable
ignore_words = ["pizza"] #placeholder. will not use this variable
friend_list = ["friend1", "friend2", "friend3"] #placeholder. will not use this variable

# If you want to enter your Instagram Credentials directly just enter
# username=<your-username-here> and password=<your-password> into InstaPy
# e.g like so InstaPy(username="instagram", password="test1234")

bot = InstaPy(username=insta_username, password=insta_password, headless_browser=True)
with smart_run(bot):
    bot.set_relationship_bounds(
        enabled=True,
        potency_ratio=-1.21,
        delimit_by_numbers=True,
        max_followers=4590,
        max_following=5555,
        min_followers=45,
        min_following=77,
    )
    #Comment Section
    bot.set_do_comment(True, percentage=10)
    bot.set_comments(["Cool!", "Awesome!", "Nice!"])
    # bot.set_dont_include(friend_list)
    # bot.set_dont_like(dont_like)
    # bot.set_ignore_if_contains(ignore_words)

    #like section
    bot.like_by_tags(["dog", "#cat"], amount=100)
    bot.end()

I'm running this out of a locally sync'd G: drive (google drive). I know that running the cd command to get there was a little more complicated than navigating to my C: drive (I had to first run G:) but the code volume is a relative reference like the below, so I assume it would know where to point.

    volumes:
      - ./:/code

Any ideas? Do I need an absolute reference to the volume?

For reference, I'm running on windows 10; OS build 19042.867

@elulcao
Copy link
Contributor

elulcao commented Sep 19, 2021

Hello,

I'm getting the following error when I follow the docker-compose guide.

File "docker_quickstart.py", line 1, in <module>
from instapy import InstaPy
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 963, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 906, in _find_spec
File "<frozen importlib._bootstrap_external>", line 1280, in find_spec
File "<frozen importlib._bootstrap_external>", line 1252, in _get_spec
File "<frozen importlib._bootstrap_external>", line 1368, in find_spec
File "<frozen importlib._bootstrap_external>", line 1408, in _fill_cache
OSError: [Errno 38] Function not implemented: '/code'

for reference, her is my docker_quickstart.py file:

from instapy import InstaPy
from instapy.util import smart_run

# Write your automation here
# Stuck? Look at the github page https://github.com/InstaPy/instapy-quickstart

insta_username = "<redacted>"
insta_password = "<redacted>"

dont_like = ["food", "girl", "hot"] #placeholder. will not use this variable
ignore_words = ["pizza"] #placeholder. will not use this variable
friend_list = ["friend1", "friend2", "friend3"] #placeholder. will not use this variable

# If you want to enter your Instagram Credentials directly just enter
# username=<your-username-here> and password=<your-password> into InstaPy
# e.g like so InstaPy(username="instagram", password="test1234")

bot = InstaPy(username=insta_username, password=insta_password, headless_browser=True)
with smart_run(bot):
    bot.set_relationship_bounds(
        enabled=True,
        potency_ratio=-1.21,
        delimit_by_numbers=True,
        max_followers=4590,
        max_following=5555,
        min_followers=45,
        min_following=77,
    )
    #Comment Section
    bot.set_do_comment(True, percentage=10)
    bot.set_comments(["Cool!", "Awesome!", "Nice!"])
    # bot.set_dont_include(friend_list)
    # bot.set_dont_like(dont_like)
    # bot.set_ignore_if_contains(ignore_words)

    #like section
    bot.like_by_tags(["dog", "#cat"], amount=100)
    bot.end()

I'm running this out of a locally sync'd G: drive (google drive). I know that running the cd command to get there was a little more complicated than navigating to my C: drive (I had to first run G:) but the code volume is a relative reference like the below, so I assume it would know where to point.

    volumes:
      - ./:/code

Any ideas? Do I need an absolute reference to the volume?

For reference, I'm running on windows 10; OS build 19042.867

Why you are mapping the current dir? Please check the docker/podman doc for mapping volumes,

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

No branches or pull requests

2 participants