TypeError
Closed this issue · 3 comments
Beyarz commented
Adding the prefix ./
before the filename will cause an TypeError.
➜ desktop irb
2.7.0 :001 > require 'skynet'
=> true
2.7.0 :003 > Skynet.upload_file('./7502_03_web.pdf')
Traceback (most recent call last):
8: from /Users/beyar/.rvm/gems/ruby-2.7.0/bin/ruby_executable_hooks:24:in `<main>'
7: from /Users/beyar/.rvm/gems/ruby-2.7.0/bin/ruby_executable_hooks:24:in `eval'
6: from /Users/beyar/.rvm/gems/ruby-2.7.0/bin/irb:23:in `<main>'
5: from /Users/beyar/.rvm/gems/ruby-2.7.0/bin/irb:23:in `load'
4: from /Users/beyar/.rvm/gems/ruby-2.7.0/gems/irb-1.2.7/exe/irb:11:in `<top (required)>'
3: from (irb):3
2: from /Users/beyar/.rvm/gems/ruby-2.7.0/gems/ruby-skynet-1.3.2/lib/skynet/upload.rb:46:in `upload_file'
1: from /Users/beyar/.rvm/gems/ruby-2.7.0/gems/ruby-skynet-1.3.2/lib/skynet/upload.rb:46:in `+'
TypeError (no implicit conversion of nil into String)
If the string contains the prefix ./
then it should be stripped away.
KagemniKarimu commented
I can confirm this issue. I received the same TypeError when passing a valid path to the upload_file Method. I was able to work around it by removing just the "." instead of both "." and "/" from the passed arguments. However, issue persists when keeping it in.
KagemniKarimu commented
Because of this can't seem to pass relative path(s) to the upload_file Method ; Fix is needed - workaround ineffective.