Coder Social home page Coder Social logo

docker-compose error about technical HOT 11 CLOSED

freqtrade avatar freqtrade commented on May 5, 2024
docker-compose error

from technical.

Comments (11)

xmatthias avatar xmatthias commented on May 5, 2024

as long as you're using the compose file for backtesting (as documented here, the above seems correct.

from technical.

Armando0z avatar Armando0z commented on May 5, 2024

Thanks for the reply,
I checked the link you posted, please correct me if I'm wrong... by "compose file" do you mean the docker-compose.yml file?

from technical.

Armando0z avatar Armando0z commented on May 5, 2024

When I was first trying to backtest a strategy that required techinical, I was doing it with the default docker image, so the error I got was this (same error you get when technical is not installed in a non-docker freqtrade):

Could not import /freqtrade/user_data/strategies/trend_strategy.py due to 'No module named 'technical''

But after I realized this and created the custom image with technical, now the error states 'No module named 'technical.vendor'', wich I´ve never seen in a non-docker instalation of technical. So I'm assuming the problem could in the image, or that the bot isn´t calling this module correctly.

Any idea how to make the bot find the technical.vendor module?

Thank you again for your time to answer, I have not much coding experience and haven´t been able to figure out this problem. I really appreciate your help

from technical.

xmatthias avatar xmatthias commented on May 5, 2024

If you use the command (or a similar command) as described in the linked documentation, the docker-image you specified in your docker-compose.yml file will be used.

e.g.
docker-compose run --rm freqtrade backtesting --config user_data/config.json --strategy SampleStrategy --timerange 20190801-20191001 -i 5m

Now one line concerns me (it'll depend on the version of freqtrade you're using) ...
does the dockerfile you specifh (dockerfile: "./Dockerfile.technical") really exist?
this was moved to docker/Dockerfile.technical a while ago.
Does building of the docker image work correctly?
if the same strategy (the one that's importing technical.vendor) works in trade mode, there's NO reason it wouldn't work in backtesting, unless you're using a wrong command (which is not using your custom image).

from technical.

Armando0z avatar Armando0z commented on May 5, 2024

Thanks again for your answer,

  1. The docker file specifyed in dockerfile: "./Dockerfile.technial is only there because I created it (copied from https://github.com/freqtrade/freqtrade/blob/develop/docker/Dockerfile.technical ). the directory were I'm running docker-compose looks like this:
PS C:\ft_usderdata> ls


    Directorio: C:\ft_usderdata


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        29/12/2020     08:30                user_data
-a----        29/12/2020     11:03            780 docker-compose.yml
-a----        29/12/2020     11:37            181 Dockerfile.technical
  1. The docker image builds succesfuly after using the command:
PS C:\ft_usderdata> docker-compose build
Building freqtrade
Step 1/2 : FROM freqtradeorg/freqtrade:develop
 ---> 0d4d3ce16fcc
Step 2/2 : RUN apt-get update     && apt-get -y install git     && apt-get clean     && pip install git+https://github.com/freqtrade/technical
 ---> Using cache
 ---> b21163de5c73

Successfully built b21163de5c73
Successfully tagged freqtradeorg/freqtrade:custom
  1. The strategy doesn´t work in trade mode either. It gives me the same error when running the command:
    docker-compose run --rm freqtrade trade --strategy TrendStrategy

**I´ve only been able to trade and backtest the strategy in a separate installation without docker, installing technical in the freqtrade virtual environment, folowing the steps from the guide: https://github.com/freqtrade/technical

But I just haven´t been able to run the strategy from the docker-compose image
I hope this can give you a better picture of my problem,
Thanks a lot for helping

from technical.

xmatthias avatar xmatthias commented on May 5, 2024

maybe try do delete both images and then rebuild them

it looks like it's using cache - which hides the "real" installation process - so maybe "something" failed along the way ...

docker rmi freqtradeorg/freqtrade:develop
docker rmi freqtradeorg/freqtrade:custom

from technical.

Armando0z avatar Armando0z commented on May 5, 2024

I just tryed the commands you posted to delete the images, and then I run docker-compose build, the image was built succesfully, but the problem persists. No module named 'technical.vendor'
Thanks for your answer, I hope there´s a solution to this, so far I´ve only been able to work without docker (not optimal, as I´m testing on different vps's to run the bot)
Do you think It´s possible that the instalation from && pip install git+https://github.com/freqtrade/technical could be missing something? (last installation step from the Dockerfile.technical

from technical.

elgramato avatar elgramato commented on May 5, 2024

Unfortunately, I have exactly the same problem.
I have also deleted all images and created new ones. (as you described)
In addition to && pip install git+https://github.com/freqtrade/technical, I also tried && pip install technical.
The image is always created correctly.
But I still get the error:

2020-12-31 07:55:11,828 - freqtrade.resolvers.iresolver - WARNING - Could not import /freqtrade/user_data/hyperopts/MyHyperoptAdvancedTechnical.py due to 'No module named 'technical.vendor''
2020-12-31 07:55:11,840 - freqtrade - ERROR - Impossible to load Hyperopt 'MyHyperoptAdvancedTechnical'. This class does not exist or contains Python code errors.

from technical.

xmatthias avatar xmatthias commented on May 5, 2024

Please delete the "sub-image" that includes technical and run the installation again, and it'll work.

from technical.

elgramato avatar elgramato commented on May 5, 2024

Please delete the "sub-image" that includes technical and run the installation again, and it'll work.

Yes. That looks good!
It works for me now.
Thank you for the quick fix

from technical.

Armando0z avatar Armando0z commented on May 5, 2024

Thanks a lot! now its working!

from technical.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.