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

running in Docker: ERROR: No facebook or tinder token has been set. #52

Open
PhinPhin opened this issue Oct 29, 2020 · 10 comments
Open

Comments

@PhinPhin
Copy link

PhinPhin commented Oct 29, 2020

Hi, I end up in that error after running "tindetheus browse":

root@04ccce1f985e:/# tindetheus browse Traceback (most recent call last): File "/usr/local/bin/tindetheus", line 11, in <module> load_entry_point('tindetheus', 'console_scripts', 'tindetheus')() File "/tindetheus/tindetheus/tindetheus.py", line 274, in command_line_run raise('ERROR: No facebook or tinder token has been set.' TypeError: exceptions must derive from BaseException root@04ccce1f985e:/# tindetheus browse Traceback (most recent call last): File "/usr/local/bin/tindetheus", line 11, in <module> load_entry_point('tindetheus', 'console_scripts', 'tindetheus')() File "/tindetheus/tindetheus/tindetheus.py", line 274, in command_line_run raise('ERROR: No facebook or tinder token has been set.' TypeError: exceptions must derive from BaseException root@04ccce1f985e:/# tindetheus browse Traceback (most recent call last): File "/usr/local/bin/tindetheus", line 11, in <module> load_entry_point('tindetheus', 'console_scripts', 'tindetheus')() File "/tindetheus

I both tried the Tinder Auth Token and the Facebook Auth Token. I assume something like "EAAGmXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXV0ZD" is right?

I run the docker-image in a Ubuntu that runs on a VirtualBox on Win10, doubt that is the reason for the error though?

@cjekel
Copy link
Owner

cjekel commented Oct 29, 2020

So what this sounds like, is that the .env or the environment variable isn't being set.

To see if this is the case, try to set the environment variable manually in bash before calling tindetheus browse

Either

export TINDER_AUTH_TOKEN="TODO"
export FACEBOOK_AUTH_TOKEN="TODO"

And you should see a different error.

That token seems right, and yes this would work in a VBox in Windows. WSL should work too.

@PhinPhin
Copy link
Author

PhinPhin commented Oct 29, 2020

Hi, thank you for your reply :)

Sadly, the error didn't change :| I haven't tried it with WSL, as my linux-debugging knowledge seems already here at the end ;) Thought with the docker-image it would "just work"... obviously not :P

.env is in /tinder/tindetheus, maybe it's missing some file or something else is wrong?:

/tinder
└── tindetheus
├── 0B5MzpY9kBtDVZ2RpVDYwWmxoSUk
├── CHANGELOG.md
├── Dockerfile
├── examples
│   ├── how_does_tindetheus_work.png
│   ├── make_al_like_dislike_folders.py
│   ├── open_database.py
│   └── README.md
├── GETTING_STARTED.md
├── LICENSE
├── Makefile
├── MANIFEST
├── MANIFEST.in
├── models
│   └── 20170512-110547
│   ├── 20170512-110547.pb
│   ├── model-20170512-110547.ckpt-250000.data-00000-of-00001
│   ├── model-20170512-110547.ckpt-250000.index
│   └── model-20170512-110547.meta
├── README.md
├── requirements.txt
├── scripts
│   └── env.bat
├── setup.py
├── tests
│   └── tests.py
├── tindetheus
│   ├── config.py
│   ├── export_embeddings.py
│   ├── facenet_clone
│   │   ├── align
│   │   │   ├── align_dataset_mtcnn.py
│   │   │   ├── align_dataset.py
│   │   │   ├── align_dlib.py
│   │   │   ├── det1.npy
│   │   │   ├── det2.npy
│   │   │   ├── det3.npy
│   │   │   ├── detect_face.py
│   │   │   └── init.py
│   │   ├── calculate_filtering_metrics.py
│   │   ├── classifier.py
│   │   ├── compare.py
│   │   ├── decode_msceleb_dataset.py
│   │   ├── download_and_extract_model.py
│   │   ├── download_and_extract.py
│   │   ├── download_vgg_face_dataset.py
│   │   ├── facenet.py
│   │   ├── freeze_graph.py
│   │   ├── generative
│   │   │   ├── calculate_attribute_vectors.py
│   │   │   ├── calculate_dataset_normalization.py
│   │   │   ├── init.py
│   │   │   ├── models
│   │   │   │   ├── dfc_vae_large.py
│   │   │   │   ├── dfc_vae.py
│   │   │   │   ├── dfc_vae_resnet.py
│   │   │   │   ├── init.py
│   │   │   │   └── vae_base.py
│   │   │   ├── modify_attribute.py
│   │   │   └── train_vae.py
│   │   ├── init.py
│   │   ├── lfw.py
│   │   ├── models
│   │   │   ├── dummy.py
│   │   │   ├── inception_resnet_v1.py
│   │   │   ├── inception_resnet_v2.py
│   │   │   ├── init.py
│   │   │   └── squeezenet.py
│   │   ├── train_softmax.py
│   │   ├── train_tripletloss.py
│   │   └── validate_on_lfw.py
│   ├── image_processing.py
│   ├── init.py
│   ├── machine_learning.py
│   ├── tinder_client.py
│   ├── tindetheus_align.py
│   ├── tindetheus.py
│   └── version.py
└── VALIDATE_GUIDE.md

@PhinPhin
Copy link
Author

PhinPhin commented Oct 29, 2020

Update: I just created the .env inside of the docker-instance, that way it it seems to work half'ish? I get the stats of the profiles in the console, but there is no window opening with photos...?

EDIT: is it missing a tool to display the images? I can't find any log in /var/log ... any way to hunt this down?

@cjekel
Copy link
Owner

cjekel commented Oct 29, 2020

^^ cool that seems to work.

So what I was doing, in the virtual box, navigate Files to tinder/temp_images and the profile images should populate in here. Set to the max thumbnail size, and it should work out well.

@PhinPhin
Copy link
Author

Ahhhh :) The readme sounded like a window would open with each new pic :) Maybe that should be added.

It seems to work so far, gonna try it. Thanks for your help and for this tool! :)

@cjekel
Copy link
Owner

cjekel commented Oct 29, 2020

I didn't set up any way to natively visualize the images from docker. If you are using a shared file system between docker and your vbox, then the above would work. Otherwise, you'll need to call docker such that matplotlib visualization can work.

http://wiki.ros.org/docker/Tutorials/GUI

It's a bit more complicated docker call to get the visualization to work. Something like

docker run --rm -it \
   --user=$(id -u) \
   --env="DISPLAY" \
   --workdir=/app \
   --volume="$PWD":/app \
   --volume="/etc/group:/etc/group:ro" \
   --volume="/etc/passwd:/etc/passwd:ro" \
   --volume="/etc/shadow:/etc/shadow:ro" \
   --volume="/etc/sudoers.d:/etc/sudoers.d:ro" \
   --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \

from https://stackoverflow.com/questions/46018102/how-can-i-use-matplotlib-pyplot-in-a-docker-container

@PhinPhin
Copy link
Author

PhinPhin commented Oct 29, 2020

Nah it's okay. Using the temp-folder works good enough. I just didn't figure out how it's meant to be done with the docker-setup :)

Oh just before I forget it: the AI is only trained with the images in the liked/disliked dir? Could I swap photos from one dir to the other to refine the choice a bit?

@PhinPhin
Copy link
Author

PhinPhin commented Oct 29, 2020

hm, train gives me now an error that /models/20170512-110547/ is not found... but it's in /tinder/models/20170512-110547/.

What's the sourcepath in .env?

Yep, indeed: /tinder/models/20170512-110547 is the needes path...

@cjekel
Copy link
Owner

cjekel commented Oct 29, 2020

Oh just before I forget it: the AI is only trained with the images in the liked/disliked dir? Could I swap photos from one dir to the other to refine the choice a bit?

Yes. You can move images from one folder to another. You can also add photos manually to each folder.

I made some validation function so you could evaluate predictions on some images the model wasn't trained on. It's interesting to look at for some qualitative goodness of model.

What's the sourcepath in .env?
Yep, indeed: /tinder/models/20170512-110547 is the needes path...

Ya it probably needs the absolute path in that case.

Let me know if you run into bugs, or areas of improvement. PRs welcome! Have fun. :)

@PhinPhin
Copy link
Author

Sure, will do :)

The only thing I can think about would be parsing of the profile-text for keywords and skip auto-like/dislike for manual choice (or just do a like even if the pictures failed).

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